Running delayed jobs on Heroku for free

后端 未结 5 489
执念已碎
执念已碎 2021-02-02 13:02

Is it possible to run delayed jobs on Heroku for free?

I\'m trying to use delayed_job_active_record on Heroku. However, it requires a

5条回答
  •  你的背包
    2021-02-02 13:46

    You can use Heroku Scheduler to run the jobs using the command

    rake jobs:workoff
    

    This way the jobs can run in your web dyno. According to Delayed_Job docs, this command will run all available jobs and exit.

    You can configure the scheduler to run this command every 10 minutes for example, and it doesn't have sensible effect on the app's performance when no jobs are queued. Another good idea is to schedule it to run daily at a time with lower access rates.

提交回复
热议问题