Sidekiq query for job completion
Hi Ilovebathroomlights
There are several approaches I can use, one of them I am writing below assuming you are okay to write a state to Redis, Database, or any storage you might be using and can be used to poll.
You can start by assigning a unique id to your sidekiq job, and save this id with status as "pending", at the last line inside the sidekiq job code, update the status of the unique id as "completed".
In meantime, you can poll by the unique id you generated for the particular job, and refresh the data or refresh the page.
Polling Sidekiq Job for Completion via Processing State in Database
With the tools you have you seem to be on the right track. Keeping it simple until your users demand more robust solution is IMHO a good idea.
If you however are looking to have more interactions like this(i.e. user does something and waits for update) you may consider using web socket or even employing tools like https://rethinkdb.com . Of course it depends on how many interactions like this you're planning to have.
How to call another worker from sidekiq worker and monitor its progress without pausing child worker
What you are looking here is something similar to Sidekiq Workflow. But this is available only on Sidekiq-Pro version, which is paid.
Related Topics
Ruby: Select a Hash from Inside an Array
How to Define_Method in Rails Models
Getting Attribute's Value in Nokogiri to Extract Link Urls
How to Check If a Number Is Included in a Range (In One Statement)
Get Today's Date in Jekyll with Liquid Markup
Ruby on Rails: Errors.Add_To_Base VS. Errors.Add
When Is It Better to Use a Struct Rather Than a Hash in Ruby
Rails Development Server Is Slow and Takes a Long Time to Load a Simple Page
How to Filter an Array of Hashes to Get Only the Keys in Another Array
Ubuntu 12 - How to Install Ruby and Rails Correctly
Ruby on Rails, Could Not Find a Valid Gem 'Rails'
Rails Console Running Incredibly Slowly When Editing Text
Uninstall Ruby Version from Rbenv
Rails Console - Find Where Created at = Certain Day
Using Polymorphic Paths with Nested Associations