Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background job recommendation conflicts with thread feature #62

Open
jjb opened this issue Feb 5, 2020 · 0 comments
Open

background job recommendation conflicts with thread feature #62

jjb opened this issue Feb 5, 2020 · 0 comments

Comments

@jjb
Copy link

jjb commented Feb 5, 2020

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:

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant