Is it possible to somehow view sidekiq completed job list - for example, find all PurchaseWorkers with params (1)? Yesterday in my app delayed method that was supposed to run didn't and associated entity (lets say 'purchase') got stuck in limbo with state "processing". I am trying to understand whats the reason: job wasn't en-queued at all or was en-queued but for some reason exited unexpectedly. There were no errors in sidekiq log. Thanks.
2 Answers
This is old but I wanted to see the same thing since I'm not sure if jobs I scheduled ran or not!
Turns out, Sidekiq doesn't have anything built in to see jobs that completed and still doesn't seem to.
If it err'd and never completes it should be in the 'dead' queue. But to check that something actually ran seems to be beyond Sidekiq by default.
The FAQ suggests installing 3rd party plugins to track and log information: https://github.com/mperham/sidekiq/wiki/FAQ#how-can-i-tell-when-a-job-has-finished One of them allows for having a callback to do follow up (maybe add a record for completed jobs elsewhere?)
You can also setup Sidekiq to log to somewhere other than STDOUT (default) so you can output log information about your jobs. In this case, logging that it's complete or catching errors if for some reason it is never landing in the retrying or dead jobs queue when there is a problem. See https://github.com/mperham/sidekiq/wiki/Logging
To see jobs still in queue you can use the Rails console and look at the queue by queue name https://www.rubydoc.info/gems/sidekiq/Sidekiq/Queue

- 81
- 1
- 2
One option is the default stats provided by sidekiq - https://github.com/mperham/sidekiq/wiki/Monitoring#using-the-built-in-dashboard
The best options is to use the Web UI provided here - https://github.com/mperham/sidekiq/wiki/Monitoring#web-ui

- 7,803
- 11
- 56
- 91
-
1Agreed. Why the downvote? Question didn't specifically request programmatic access, but it sounded like any means to view would be ok. Though I don't remember if you are able to view completed jobs, at least by default, because that would often increase at pretty fast rate. – EdvardM Aug 03 '17 at 14:18
-
1I didn't downvote, but I suspect the downvotes are because the default sidekiq web UI doesn't allow you to see if the job was enqueued & exited successfully/silently. You can see if it failed or retried however. – Jay Dorsey May 21 '19 at 14:42
-
9i didn't downvote, but this doesn't answer the question at all. There is no way to see *completed* jobs using sidekiq-web which is frustrating. you can only see jobs that are currently running – FireDragon May 22 '19 at 02:24