Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gateway-clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ run_as_service_user() {
. '$ENV_FILE'
set +a
cd '$INSTALL_DIR'
export PATH=\"$VENV_DIR/bin:\$PATH\"
export PATH=\"$VENV_DIR/bin:$PATH\"
$inner_cmd
"

Expand Down
2 changes: 1 addition & 1 deletion manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ run_migrations() {
. '$INSTALL_DIR/.env'
set +a
cd '$INSTALL_DIR'
PATH='$INSTALL_DIR/venv/bin:\$PATH' make migrate-up
PATH='$INSTALL_DIR/venv/bin:$PATH' make migrate-up
"
}

Expand Down
2 changes: 1 addition & 1 deletion platforms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ run_as_service_user() {
. '$ENV_FILE'
set +a
cd '$INSTALL_DIR'
export PATH=\"$VENV_DIR/bin:\$PATH\"
export PATH=\"$VENV_DIR/bin:$PATH\"
$inner_cmd
"

Expand Down
25 changes: 14 additions & 11 deletions tasks/celery_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ def make_celery() -> Celery:
except ValueError as e:
raise ValueError(f"Invalid CELERY_CLEANUP_CRON '{cleanup_cron}': {e}") from None

beat_schedule = {
"cleanup-stale-payload-sessions": {
"task": "tasks.cleanup_task.cleanup_stale_payload_sessions",
"schedule": cleanup_schedule,
},
}
if get_configs("UPTIME_KUMA_WORKER_PUSH_URL"):
# Uptime Kuma push-monitor heartbeat, see observability/README.md
beat_schedule["worker-heartbeat"] = {
"task": "tasks.heartbeat_task.ping_worker_heartbeat",
"schedule": 60.0,
}

app = Celery(
"relaysms_publisher",
include=[
Expand All @@ -111,17 +124,7 @@ def make_celery() -> Celery:
worker_log_format=_WORKER_LOG_FORMAT,
worker_task_log_format=_WORKER_TASK_LOG_FORMAT,
beat_schedule_filename=schedule_path,
beat_schedule={
"cleanup-stale-payload-sessions": {
"task": "tasks.cleanup_task.cleanup_stale_payload_sessions",
"schedule": cleanup_schedule,
},
# Uptime Kuma push-monitor heartbeat, see observability/README.md
"worker-heartbeat": {
"task": "tasks.heartbeat_task.ping_worker_heartbeat",
"schedule": 60.0,
},
},
beat_schedule=beat_schedule,
)
return app

Expand Down