I'm scheduling a job with Sidekiq and want to check the queue size right after I schedule it:
Sidekiq::ScheduledSet.new.size # => 0
Sidekiq::Queue.new.size # => 0
And I'm surprised that the queue is empty, though I see in the monitoring UI that the job was not yet executed (and in fact it gets executed moments later).
My real case is a bit more complex. I schedule a job and then render a page, and on that page I have a check if jobs of certain type are scheduled or running, but that all seems to happen to fast and my check fails (if I reload the page right away then the check succeeds).
I'm guessing there is a tiny delay between calling delay and the job actually ending up on any of the queues. Is there a way I can go around this, i.e. to check for all such jobs (that haven't yet landed on the queue).