Open sandhuharjodh opened 3 years ago
I have a celery task that is scheduled to run at a specific time of the day. The problem is this task is getting executed multiple times, so I am receiving the same email at least 2 to 3 times.
@periodic_task(run_every=crontab(hour=7, minute=10)) def send_reminder_email_at_7(): obj = Service() obj.send_email() return
On server, I have setup the project using gunicorn and the supervisor Following is the configuration of celery and celery beat
[program:proj_worker] command=/home/ubuntu/venv/bin/celery -A baseproj worker -l debug directory=/home/ubuntu/proj/ user=ubuntu numprocs=1 stdout_logfile=/home/ubuntu/logs/celerylogs/proj_worker.log stderr_logfile=/home/ubuntu/logs/celerylogs/proj_worker_err.log autostart=true autorestart=true startsecs=10 stopwaitsecs = 600 killasgroup=true priority=998
[program:proj_beat] command=/home/ubuntu/venv/bin/celery -A baseproj beat -l debug --scheduler django_celery_beat.schedulers:DatabaseScheduler directory=/home/ubuntu/proj/ user=ubuntu numprocs=1 stdout_logfile=/home/ubuntu/logs/celerylogs/proj_beat.log stderr_logfile=/home/ubuntu/logs/celerylogs/proj_beat_err.log autostart=true autorestart=true startsecs=10 stopwaitsecs = 600 killasgroup=true priority=998
if possible can you try a new version https://github.com/celery/django-celery-beat/releases/tag/v2.2.0?
any further experiences on this issue?
Facing the same issue, I am on 2.2.0 already
I have a celery task that is scheduled to run at a specific time of the day. The problem is this task is getting executed multiple times, so I am receiving the same email at least 2 to 3 times.
Detailed information
On server, I have setup the project using gunicorn and the supervisor Following is the configuration of celery and celery beat