YaleSTC / reservations

Manage equipment loans & reservations. Who can borrow what, for how long?
yalestc.github.io/reservations
MIT License
139 stars 58 forks source link

Proper background job setup #1328

Open orenyk opened 8 years ago

orenyk commented 8 years ago

Inspired by #1302 - we're starting to talk about moving away from using the *nix cron utility to run scheduled tasks and, if we actually want to do this right, we should probably start using a proper job queue setup (e.g. either Resque or Sidekiq) to handle both recurring tasks and general background jobs, e.g. send e-mails. Since this will definitely complicate deployment (requiring a worker process, Redis server, etc) it might be super long-term but definitely a major release feature.

As a side note, we should also do this post-Rails 4.2 / Rails 5 to take advantage of ActiveJob.

orenyk commented 8 years ago

Based on some more extended reading, it appears as though delayed_job should be fine for our purposes; while the other two options certainly would be more efficient if we were running thousands upon thousands of jobs per day, due to their use of Redis, we're not really going to ever need that level of performance for any of our current instances and Delayed Job should be much easier to set up. @YaleSTC/reservations, any thoughts / objections?

orenyk commented 8 years ago

This is going to be done post #1329 to make use of ActiveJob.

orenyk commented 8 years ago

1367 has been merged in, we're good to go on this now.

esoterik commented 8 years ago

This will likely make #1275 unnecessary, right?

orenyk commented 8 years ago

Not necessarily, we might still want to be able to manually run our scheduled tasks. We'll figure it out once we've made more progress here.