hasjob icon indicating copy to clipboard operation
hasjob copied to clipboard

Evaluate move from RQ to Celery

Open jace opened this issue 9 years ago • 10 comments

Redis Queue has served us well as a background job framework, but we keep feeling like we need something more:

  1. Time delayed jobs (run this job after ten minutes)
  2. Aggregate jobs (run this job, but if we already have something like this queued, just give it one more parameter)
  3. Multi-lingual jobs (this is better done in JS, so instead of running JS inside a Python wrapper, why not have a native JS worker?)
  4. Multi-machine jobs (can we offload this task to another machine with lower load?)
  5. Brokers other than Redis (can Redis do a cluster? Are we stuck with a single broker machine?)
  6. Better failure reporting (like the email/SMS log mechanism we use in coaster.logging)

While RQ has been fantastic so far, we can't help wonder:

  1. Should we move to Celery so that we have a more robust and future-proof framework, or
  2. Are we over engineering this and is RQ good enough for the foreseeable future?

This issue is for the discussion on which way to go.

jace avatar Nov 24 '15 04:11 jace

RQ does not work on Windows as it requires fork(). This does not concern us as we do not support Windows for either development or deployment.

jace avatar Nov 24 '15 04:11 jace

RQ was inspired by Celery but with the explicit goal of being simpler, and has over time acquired good ideas from Celery.

jace avatar Nov 24 '15 04:11 jace

This Stack Overflow thread on Celery vs RQ suggests Celery has a bit of a learning curve but is straightforward after that.

jace avatar Nov 24 '15 05:11 jace

A collection of notes on task queue frameworks in Python, including web services. Does not pass judgement but gives you material to read.

jace avatar Nov 24 '15 05:11 jace

Celery supports scheduled jobs and can be used as a cron replacement. This video documents how.

jace avatar Nov 24 '15 05:11 jace

This Quora thread says RQ has a cleaner approach to (a) handling failed tasks and (b) setting task priority (by using multiple queues).

jace avatar Nov 24 '15 05:11 jace

These people moved from Celery to RQ because understanding how it worked was critical to understanding how their code worked overall. This one is the biggest fear holding us back from moving to Celery.

jace avatar Nov 24 '15 05:11 jace

Resolved: we're staying with RQ, but considering other RPC/async mechanisms for the task RQ doesn't do yet: collecting results from multiple priority background jobs.

jace avatar Jul 13 '16 13:07 jace

WRT 1, you can use rq-scheduler for scheduled, periodic, or repeated tasks at the cost of running a scheduler process.

eguven avatar Feb 19 '18 16:02 eguven

Fantastic! Giving this a spin.

jace avatar Feb 22 '18 09:02 jace