-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix celery log folder creation (#1787)
- Loading branch information
1 parent
373b68e
commit 0b09ca4
Showing
5 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Set the working directory to the root of the project | ||
cd /var/www/circulation | ||
source env/bin/activate | ||
|
||
# Make sure the log directory exists and is writable | ||
mkdir -p /var/log/celery | ||
chown 1000:adm /var/log/celery | ||
|
||
# Make sure the run directory exists and is writable | ||
mkdir -p /var/run/celery | ||
chown 1000:1000 /var/run/celery | ||
|
||
# Start the celery beat process | ||
exec env/bin/celery -A "core.celery.worker.app" beat --uid 1000 --gid 1000 --logfile /var/log/celery/beat.log -s /var/run/celery/beat-schedule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Set the working directory to the root of the project | ||
cd /var/www/circulation | ||
source env/bin/activate | ||
|
||
# Make sure the log directory exists and is writable | ||
mkdir -p /var/log/celery | ||
chown 1000:adm /var/log/celery | ||
|
||
# Start the celery worker | ||
exec env/bin/celery -A "core.celery.worker.app" worker --uid 1000 --gid 1000 --autoscale 4,1 --hostname default@%h -Q high,default --logfile /var/log/celery/default.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Set the working directory to the root of the project | ||
cd /var/www/circulation | ||
source env/bin/activate | ||
|
||
# Make sure the log directory exists and is writable | ||
mkdir -p /var/log/celery | ||
chown 1000:adm /var/log/celery | ||
|
||
# Start the celery worker | ||
exec env/bin/celery -A "core.celery.worker.app" worker --uid 1000 --gid 1000 --concurrency 1 --hostname high@%h -Q high --logfile /var/log/celery/high.log |