+4![gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)









Yeuoly
GitHub
Stream
lyzno1
zhsama
Harry
lyzno1
yessenia
hjlarry
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
WTW0313
Copilot
b76e17b25d
Signed-off-by: lyzno1 <[email protected]> Co-authored-by: Stream <[email protected]> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: zhsama <[email protected]> Co-authored-by: Harry <[email protected]> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: yessenia <[email protected]> Co-authored-by: hjlarry <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WTW0313 <[email protected]> Co-authored-by: Copilot <[email protected]>
60 lines
1.3 KiB
Bash
Executable File
60 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
# Help function
|
|
show_help() {
|
|
echo "Usage: $0 [OPTIONS]"
|
|
echo ""
|
|
echo "Options:"
|
|
echo " --loglevel LEVEL Log level (default: INFO)"
|
|
echo " --scheduler SCHEDULER Scheduler class (default: celery.beat:PersistentScheduler)"
|
|
echo " -h, --help Show this help message"
|
|
echo ""
|
|
echo "Examples:"
|
|
echo " $0"
|
|
echo " $0 --loglevel DEBUG"
|
|
echo " $0 --scheduler django_celery_beat.schedulers:DatabaseScheduler"
|
|
echo ""
|
|
echo "Description:"
|
|
echo " Starts Celery Beat scheduler for periodic task execution."
|
|
echo " Beat sends scheduled tasks to worker queues at specified intervals."
|
|
}
|
|
|
|
# Parse command line arguments
|
|
LOGLEVEL="INFO"
|
|
SCHEDULER="celery.beat:PersistentScheduler"
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
case $1 in
|
|
--loglevel)
|
|
LOGLEVEL="$2"
|
|
shift 2
|
|
;;
|
|
--scheduler)
|
|
SCHEDULER="$2"
|
|
shift 2
|
|
;;
|
|
-h|--help)
|
|
show_help
|
|
exit 0
|
|
;;
|
|
*)
|
|
echo "Unknown option: $1"
|
|
show_help
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
cd "$SCRIPT_DIR/.."
|
|
|
|
echo "Starting Celery Beat with:"
|
|
echo " Log Level: ${LOGLEVEL}"
|
|
echo " Scheduler: ${SCHEDULER}"
|
|
|
|
uv --directory api run \
|
|
celery -A app.celery beat \
|
|
--loglevel ${LOGLEVEL} \
|
|
--scheduler ${SCHEDULER} |