JoobQ::WorkerRegistry
Inherits Reference < Object
Publishes this process as a worker: a heartbeat refreshes a TTL'd hash and an index entry, so crashed processes disappear on their own.
Constants
INDEX = "joobq:workers"
INTERVAL = 10.seconds
Log = ::Log.for("WORKER_REGISTRY")
PREFIX = "joobq:worker:"
TTL = 30.seconds
Constructors
new(store : RedisStore = RedisStore.instance, id : String = "#{System.hostname}:#{Process.pid}")
SourceClass methods
Live workers, newest heartbeat first. Entries whose TTL lapsed are pruned.
Instance methods
beat(status : String = "running") : Nil
Sourcefollow_desired_concurrency
Follows worker counts an operator set after this process started; a redeploy with new config therefore wins over an older operator choice.
id
Sourcestart
Sourcestop
Source