Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Orphaned workhorse recreates redis key of the killed worker with TTL -1 #1602

@kusaku

Description

@kusaku

When a worker is terminated with kill -9 (for example, suprevisor can terminate workers with SIGKILL), the workhorse will continue running.

Workhorse may finish or fail. In both cases it will execute some stats methods:

  • Worker.increment_successful_job_count()
  • Worker.increment_failed_job_count()
  • Worker.increment_total_working_time()

These methods will execute redis HINCRBY and HINCRBYFLOAT on a non-existent key of terminated worker (redis key of worker is deleted by TTL), for absent key redis will set the standard ttl -1and that key will become immortal.`

A check could be added to see if the worker still exists before updating the stats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions