1

I have a job, which should be implemented every 500ms.

But, as I see, the smallest timeout is 1 second. How can I decrease this limit? Is there any functionality like this:

class MyWorker
  include Sidekiq::Worker
  include Sidetiq::Schedulable

  recurrence do
    millisecondly(500)

?

Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
  • 1
    possible duplicate of [Ruby sleep or delay less than a second?](http://stackoverflow.com/questions/2543034/ruby-sleep-or-delay-less-than-a-second) – Lukas Baliak Apr 09 '15 at 10:28
  • How can I use this as a sidetiq job? – Alex Antonov Apr 09 '15 at 10:54
  • AFAIK Sidekiq is by default configured to check for incomping jobs every 15 seconds per process. Adjusting it to poll each half a second (that could probably allow you to do stuff like this) will greatly increase system load, I'd rather say Sidekiq is the wrong tool for the job here. I can't hint on what's right though. – D-side Apr 09 '15 at 12:17
  • D-Side, I said about sidetiq, not sidekiq – Alex Antonov Apr 09 '15 at 12:42
  • It's based on Sidekiq, what I said still applies. – D-side Apr 09 '15 at 12:57

0 Answers0