経緯

  • Sidekiqを新たに導入するために、公式ドキュメントを見直していた
  • 公式ドキュメントに「Workerという言葉は使わないように」と書いてあった

公式ドキュメントの引用

4. Use Precise Terminology
Within the Sidekiq ecosystem, the term worker is ambiguous and thus meaningless.

- Sidekiq::Job is a module included in a job class.
- If you have 10 "workers" executing jobs, you have 10 threads.
- If you start a "worker", you have a process.
- If you have 10 "workers" enqueued, you have 10 jobs.
Use those terms: job class, thread, process or job. Dump "worker" from your vocabulary.

ディスカッション

https://github.com/sidekiq/sidekiq/discussions/4971

やったこと

公式ドキュメントで使われている「HogeJob」という命名を使うようにした。

class HardJob
  include Sidekiq::Job

  def perform(name, count)
    # do something
  end
end