Annotate all sidekiq workers with bound, latency_sensitivity and category labels
Part of &96 (closed), proposal in epic.
For each sidekiq worker class, we add three mandatory attributes:
-
latency_sensitive
:true
orfalse
. Whether the execution of this job is sensitive to delays. For example,post_commit
is, buthousekeeping
is not. -
bound
::cpu
,:io
or:memory
. Whether the job is IO-bound, CPU-bound, or memory-bound. -
category
: an arbitrary category/grouping for the worker.
These are added directly to the worker class in Ruby:
class MyWorker
include ApplicationWorker
latency_sensitive true
bound :cpu
category :verify
def perform()
# ....
end
end
Edited by Andrew Newdigate