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

Task is not running if previous task in Process #25

Open
brijeshror opened this issue Jan 27, 2017 · 3 comments
Open

Task is not running if previous task in Process #25

brijeshror opened this issue Jan 27, 2017 · 3 comments

Comments

@brijeshror
Copy link

Hi

For example, there are 2 tasks in clock.rb
every(1.week, 'task_1', tz: 'Amsterdam', :at => 'Friday 01:00'){ rake tasks:task_1 }
every(1.week, 'task_2', tz: 'Amsterdam', :at => 'Friday 02:00'){ rake tasks:task_2 }

If task_1 is running till 2:00 then task_2 is not started. Let me know how to start task_2 process when task_1 is already in process.

Thanks

@brijeshror
Copy link
Author

Any update on this?

@gr8bit
Copy link

gr8bit commented Feb 16, 2017

Sorry to jump in with my 10-minute-knowledge about clockwork, but as far as I understood, clockwork runs in a single thread - therefore execution of a task keeps it busy while it runs and it cannot do simultaneous tasks. You would either

  • use the threads option (I'm sure I saw one) to spawn multiple simultaneous processes or
  • (better) use clockwork to start background runners like Rails' ActiveJobs, Sidekiq, Resque, etc. which will run in the background

I hope that helps, I literally have 10 minutes knowledge about this. Cheers

@brijeshror
Copy link
Author

Thanks for update.

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

2 participants