0

I tried several ways to configure a celery worker service to run on beanstalk amazon linux 2, I followed this tutorial, however it doesn't work for me, I got the following error:

Failed at step EXEC spawning /var/app/current:$PYTHONPATH/celery: No such file or directory

This my 01_create_service_celery.sh:

#!/usr/bin/env bash

# Create the celery systemd service file
echo "[Unit]

Description=Celery service for __
After=network.target

[Service]
Type=simple
Restart=always
RestartSec=30
User=root
WorkingDirectory=/var/app/current
ExecStart=$PYTHONPATH/celery -A notifications worker --loglevel=INFO
ExecReload=$PYTHONPATH/celery -A notifications worker --loglevel=INFO
EnvironmentFile=/opt/elasticbeanstalk/deployment/env
[Install]
WantedBy=multi-user.target
" | tee /etc/systemd/system/celery.service

# Start celery service
systemctl start celery.service

# Enable celery service to load on system start
systemctl enable celery.service
GustavoNogueira
  • 389
  • 1
  • 3
  • 16

0 Answers0