-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3989 from kobotoolbox/3988-celery-priority-queues
Move background tasks for REST Services to their own queue
- Loading branch information
Showing
7 changed files
with
31 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -e | ||
source /etc/profile | ||
|
||
# Run the main Celery worker (will process only low priority jobs). | ||
# Start 2 processes by default; this will be overridden later, in Python code, | ||
# according to the user's preference saved by django-constance | ||
cd "${KPI_SRC_DIR}" | ||
|
||
exec celery -A kobo worker --loglevel=info \ | ||
--hostname=kpi_main_worker@%h \ | ||
--logfile=${KPI_LOGS_DIR}/celery_low_priority.log \ | ||
--pidfile=/tmp/celery_low_priority.pid \ | ||
--queues=kpi_low_priority_queue \ | ||
--exclude-queues=kpi_queue \ | ||
--uid=${UWSGI_USER} \ | ||
--gid=${UWSGI_GROUP} \ | ||
--autoscale 2,2 |
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
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