Run scheduled tasks through application database
This commit is contained in:
@@ -40,12 +40,7 @@ services:
|
||||
env_file:
|
||||
- .env.staging.runtime
|
||||
environment:
|
||||
SKIP_DEFAULT_USERS: "true"
|
||||
TDR_DATABASE_PATH: /app/data/shd-build-staging.db
|
||||
TDR_AVATAR_STORAGE_PATH: /app/data/avatars
|
||||
TDR_GAME_ICON_STORAGE_PATH: /app/data/game-icons
|
||||
volumes:
|
||||
- shd_stage_data:/app/data
|
||||
SCHEDULER_URL: http://app:3000/api/internal/scheduler
|
||||
depends_on:
|
||||
app:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -7,12 +7,7 @@ if [ "${1:-}" = "serve" ]; then
|
||||
fi
|
||||
|
||||
if [ "${1:-}" = "scheduler" ]; then
|
||||
while true; do
|
||||
node scripts/system-notification-dispatch.mjs
|
||||
node scripts/oversight-notification-dispatch.mjs
|
||||
node scripts/notification-digest.mjs
|
||||
sleep 60
|
||||
done
|
||||
exec node scripts/scheduler-client.mjs
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user