CDLUC3 / ezid

CDLUC3 ezid
MIT License
11 stars 4 forks source link

Install and configure Celery for task tracking in our code and python config #555

Open sfisher opened 5 months ago

sfisher commented 5 months ago

Celery is a message queue service that this library requires since tracking requests get sent to Matomo asynchronously to avoid slowdowns associated with sending tracking from the server as part of the API request. It also decouples problems with the Matomo service being down or slow from the EZID API. https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html

In addition, Celery requires some kind of persistent storage or a message broker. They prefer RabbitMQ or Redis, but it can also be run with AWS message queues, SQLite or MySQL (or others supported by SQL Alchemy library).

I believe a database version of backend is sufficient for our needs and we don't need to persistently track a large number of tasks for our use case and we can probably remove items from the list after a short time since this isn't a critical use of a message queue for an essential service.

ashleygould commented 5 months ago

actually the uc3 oeprarions project is tracking this issue here directly.

I've read up on running celery in systemd based on https://docs.celeryq.dev/en/stable/userguide/daemonizing.html.