VoucherVault icon indicating copy to clipboard operation
VoucherVault copied to clipboard

Replace celery with crontab

Open MagiX13 opened this issue 7 months ago • 3 comments

Should fix #74

Reduces memory footprint and CPU idle load by removing celery and redis in favor of crontabs as well as moving from the django runserver to gunicorn instead

MagiX13 avatar May 25 '25 22:05 MagiX13

Will have to test the cron stuff.

Must say that I have very bad experience using crontab/cron for Django running in a Docker container. This is the whole reason why django-celery-beat is used (best practice + django admin ui configuration possible).

One can also find many issues regarding cron+docker. I just want to ensure a 100% reliable cron for expiry checks.

Thanks for the PR!

l4rm4nd avatar May 25 '25 22:05 l4rm4nd

I read a bit about the docker crontab issues. As this is running crontab as a service in the background, I wouldn't expect much of an issue here to be honest, but then I haven't found the time to test all eventualities here

MagiX13 avatar May 26 '25 06:05 MagiX13

turns out having the correct python path helps running the tasks :)

MagiX13 avatar May 26 '25 07:05 MagiX13

Will keep this PR in the backlog.

At the moment, no requirement to switch from celery-beat to plain crontab.

Many thanks though for the PR and the code adjustments!

l4rm4nd avatar Jun 09 '25 01:06 l4rm4nd