Created
February 12, 2020 09:36
-
-
Save petrikoz/3ecf38f9b5ea0aac323a67a2dd5e0964 to your computer and use it in GitHub Desktop.
Add support Django RQ to uWSGI reload on NetAngels hosting
This file contains hidden or 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
#!/usr/bin/env bash | |
project_base="$HOME/SITE-FOLDER" | |
# Restart RQ | |
rqworker_name="$(basename $project_base)-rqworker" | |
rqworker_pidfile="$project_base/etc/rqworker.pid" | |
pkill -e -F "$rqworker_pidfile" || true | |
"$project_base/.env/bin/python" "$project_base/app/manage.py" \ | |
rqworker --name "$rqworker_name" --pid "$rqworker_pidfile" \ | |
> "$project_base/log/rqworker.log" 2>&1 & | |
# Reload uWSGI | |
touch "$project_base/reload" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment