Indicate to an ajax process that the delayed job has completed

后端 未结 3 2115
小蘑菇
小蘑菇 2020-12-15 00:25

I have a Rails 3 app that uses delayed_job to fetch some data (with a class method) when the user hits the page. How can I indicate to the ajax process that the class method

3条回答
  •  [愿得一人]
    2020-12-15 00:43

    With this gem you can have progress tracking directly on the Delayed::Job object itself: https://github.com/GBH/delayed_job_progress

    Completed jobs are no longer automatically removed, so you can poll against a job until it comes back with completed state.

提交回复
热议问题