Skip to content

Commit

Permalink
feat(celery): create log file if does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamad-liyaghi committed Aug 10, 2024
1 parent b1ad6fb commit 9ce0a85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/scripts/celery-beat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ else
LOGLEVEL="DEBUG"
fi

echo "Creating Log File"
if [ ! -f /var/log/celery-beat.log ]; then
touch /var/log/celery-beat.log
fi

echo "Running celery beat worker..."
celery -A config beat --loglevel=$LOGLEVEL -f /var/log/celery-beat.log
4 changes: 4 additions & 0 deletions docker/scripts/celery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if [[ $ENVIRONMENT == "PRODUCTION" ]]; then
else
LOGLEVEL="DEBUG"
fi
echo "Creating Log File"
if [ ! -f /var/log/celery.log ]; then
touch /var/log/celery.log
fi

echo "Running celery worker..."
celery -A config worker --loglevel=$LOGLEVEL -f /var/log/celery.log

0 comments on commit 9ce0a85

Please sign in to comment.