You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently use cron and standalone rails runner invocations. This is Good Enough for me in many ways, but one problem is when two jobs run at the same time, they create entirely independent rails instances, taking up a lot of memory. And there is CPU overhead involved in creating a rails instance for each job.
So ideally I would have 1 rails instance that ran console-like commands inside it on a schedule. I think the clockwork can achieve exactly that.
The readme says:
The clock process only makes sense as a place to schedule work to be done, not to do the work
But there is also the :thread features, for long-running processes.
Is it perfectly possible, and sort of fine, to use the clock process to do the work, but just not recommended? What's the thread feature for? Maybe for work that has to be scheduled every 5 seconds on the nose or something, and can't even be 1 second late?
Thanks, and sorry of this is covered in the docs already. When I get an answer I'll submit some improvements to the docs!
The text was updated successfully, but these errors were encountered:
Hi, thanks for a great project!
I currently use cron and standalone
rails runner
invocations. This is Good Enough for me in many ways, but one problem is when two jobs run at the same time, they create entirely independent rails instances, taking up a lot of memory. And there is CPU overhead involved in creating a rails instance for each job.So ideally I would have 1 rails instance that ran console-like commands inside it on a schedule. I think the clockwork can achieve exactly that.
The readme says:
But there is also the
:thread
features, for long-running processes.Is it perfectly possible, and sort of fine, to use the clock process to do the work, but just not recommended? What's the thread feature for? Maybe for work that has to be scheduled every 5 seconds on the nose or something, and can't even be 1 second late?
Thanks, and sorry of this is covered in the docs already. When I get an answer I'll submit some improvements to the docs!
The text was updated successfully, but these errors were encountered: