Report this

What is the reason for this report?

After adding SSL to my project, Celery is not functioning properly

Posted on February 14, 2024

After initially implementing Celery in my project, it was working fine. However, after adding SSL to the project, Celery has stopped functioning, and emails are not being sent.The other functionalities in my project are sending emails successfully, but the emails triggered by Celery tasks are not being sent.

the below is the output that means celery running in background properly.

root@django-project:/myprojects# source projectenv/bin/activate
(projectenv) root@django-project:/myprojects# cd ..
(projectenv) root@django-project:/# sudo supervisorctl stop celery_worker
celery_worker: stopped
(projectenv) root@django-project:/# sudo supervisorctl stop celery_beat
celery_beat: stopped
(projectenv) root@django-project:/# sudo supervisorctl restart celery_worker
celery_worker: ERROR (not running)
celery_worker: started
(projectenv) root@django-project:/# sudo supervisorctl restart celery_beat
celery_beat: ERROR (not running)
celery_beat: started
(projectenv) root@django-project:/# sudo supervisorctl status celery_worker
celery_worker                    RUNNING   pid 353104, uptime 0:00:27
(projectenv) root@django-project:/# sudo supervisorctl status celery_beat
celery_beat                      RUNNING   pid 353113, uptime 0:00:25
(projectenv) root@django-project:/#

the below is celery_beat.conf file

[program:celery_beat]
command=/myprojects/projectenv/bin/celery -A core beat -l info
directory=/myprojects/green_bill
user=root
autostart=true
autorestart=true
stderr_logfile=/var/log/celery_beat.err.log
stdout_logfile=/var/log/celery_beat.out.log
environment=PATH="/myprojects/projectenv/bin:%(ENV_PATH)s"

the below is celery_worker.conf file

[program:celery_worker]
command=/myprojects/projectenv/bin/celery -A core.celery worker --pool=solo -l info
directory=/myprojects/green_bill
user=root
autostart=true
autorestart=true
stderr_logfile=/var/log/celery_worker.err.log
stdout_logfile=/var/log/celery_worker.out.log
environment=PATH="/myprojects/projectenv/bin:%(ENV_PATH)s"

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.