mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 17:26:17 +00:00
refactor: remove legacy scheduling and analytics code
- Deleted the scheduler module and its associated functions, transitioning to OS-level scheduling. - Removed the Analytics module and its related interfaces, retaining only a placeholder for backward compatibility. - Updated ConfigValidator to warn about legacy schedule and analytics configurations. - Cleaned up StartupValidator to remove diagnostics and schedule validation logic. - Adjusted Load.ts to handle legacy flags for diagnostics and analytics. - Removed unused diagnostics capturing functionality.
This commit is contained in:
21
compose.yaml
21
compose.yaml
@@ -11,25 +11,12 @@ services:
|
||||
- ./sessions:/app/sessions
|
||||
|
||||
environment:
|
||||
TZ: "America/Toronto" # Set your timezone for proper scheduling (used by image and scheduler)
|
||||
TZ: "America/Toronto" # Set your timezone for logging (and cron if enabled)
|
||||
NODE_ENV: "production"
|
||||
# Force headless when running in Docker (uses Chromium Headless Shell only)
|
||||
FORCE_HEADLESS: "1"
|
||||
|
||||
# ============================================================
|
||||
# SCHEDULING MODE: Choose one
|
||||
# ============================================================
|
||||
# Option 1: Built-in JavaScript Scheduler (default, recommended)
|
||||
# - No additional setup needed
|
||||
# - Uses config.jsonc schedule settings
|
||||
# - Lighter resource usage
|
||||
#SCHEDULER_DAILY_JITTER_MINUTES_MIN: "2"
|
||||
#SCHEDULER_DAILY_JITTER_MINUTES_MAX: "10"
|
||||
#SCHEDULER_PASS_TIMEOUT_MINUTES: "180"
|
||||
#SCHEDULER_FORK_PER_PASS: "true"
|
||||
|
||||
# Option 2: Native Cron (for users who prefer traditional cron)
|
||||
# Uncomment these lines to enable cron instead:
|
||||
# Optional: enable in-container cron scheduling
|
||||
#USE_CRON: "true"
|
||||
#CRON_SCHEDULE: "0 9 * * *" # Daily at 9 AM (see https://crontab.guru)
|
||||
#RUN_ON_START: "true" # Run once immediately on container start
|
||||
@@ -38,5 +25,5 @@ services:
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
# Default: use built-in scheduler (entrypoint handles mode selection)
|
||||
command: ["npm", "run", "start:schedule"]
|
||||
# Default: single run per container start
|
||||
command: ["node", "--enable-source-maps", "./dist/index.js"]
|
||||
Reference in New Issue
Block a user