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

Replace RQ with Celery as queuing backend #223

Closed
jathanism opened this issue Mar 31, 2021 · 3 comments
Closed

Replace RQ with Celery as queuing backend #223

jathanism opened this issue Mar 31, 2021 · 3 comments
Assignees
Labels
type: feature Introduction of new or enhanced functionality to the application
Milestone

Comments

@jathanism
Copy link
Contributor

jathanism commented Mar 31, 2021

Environment

  • Python version: 3.6+
  • Nautobot version: v1.1.0 maybe?

Proposed Functionality

Use Case

  • Celery is more robust than RQ and fully implements AMQP for advanced message routing.
  • Celery workers can instantiate multiple subprocesses at launch time and reuse them for multiple tasks. With RQ, you have to fork on every job. (Forking has been known to cause issues with leaking state of database connections).
    • Further, RQ can only run on systems that support fork
  • Celery has much more advanced monitoring and telemetry out of the box
  • Celery supports RabbitMQ for even more advanced enterprise support options such as message persistence, clustering
  • Celery supports subtasks

Largely the justification revolves around evolving from just using task queueing for basic background tasks, at which RQ excels, to supporting advanced task queuing workflows, at which Celery excels.

Database Changes

None, unless Django as a Celery results backend is implemented.

External Dependencies

None.

Celery has full support for Redis as a broker so dependency upon Redis would not need to change.

@jathanism jathanism added type: housekeeping Changes to the application which do not directly impact the end user type: feature Introduction of new or enhanced functionality to the application status: future and removed type: housekeeping Changes to the application which do not directly impact the end user labels Mar 31, 2021
@jedelman8
Copy link
Contributor

Can we add actual use cases that are driving this? Otherwise, it seems subjective and just weighing technical merits of RQ and celery.

@jathanism
Copy link
Contributor Author

Other important use cases:

  • Built in support for storing task results as database objects w/ args/kwargs/inputs w/ django-celery-results
  • Built in support for scheduling/recurring/crontab tasks w/ args/kwargs as database objects w/ django-celery-beat

@jedelman8 jedelman8 changed the title Replace RQ with Celery as queue backend Ad RQ with Celery as queuing backend May 28, 2021
@jedelman8 jedelman8 added this to the v1.1.0 milestone May 28, 2021
@jedelman8 jedelman8 added this to To do in Release v1.1.0 via automation May 28, 2021
@jedelman8 jedelman8 changed the title Ad RQ with Celery as queuing backend Add RQ with Celery as queuing backend May 28, 2021
@jathanism jathanism changed the title Add RQ with Celery as queuing backend Replace RQ with Celery as queuing backend May 28, 2021
@jedelman8
Copy link
Contributor

Has been addressed from a few different PRs as shown above.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new or enhanced functionality to the application
Projects
No open projects
Development

No branches or pull requests

3 participants