All checks were successful
Deploy / deploy (push) Successful in 28s
The one-shot VERIFY_DELAY_MINUTES check was too rigid: MassPrice's processing time varies widely in practice (observed ~1 to over 20 minutes, and its queue can back up further under load — confirmed live, a run still sitting in "Queued" 15+ minutes in), so a single check window either misses slow-but-fine completions or has to be set needlessly long. Replaced with a poll loop: scheduler.py reschedules another one-off check every VERIFY_POLL_MINUTES (default 5) until automation's check_completion() reports "complete", up to VERIFY_MAX_ATTEMPTS (default 12, ~1 hour) before giving up and marking "not_confirmed" for good. verify_run() is split into a pure check_completion() (no storage side effects) so scheduler.py's loop owns the retry/give-up decision; automation.py just answers "is it done yet". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
42 lines
2.5 KiB
Text
42 lines
2.5 KiB
Text
# ══════════════════════════════════════════════════════════════════
|
|
# MassPrice Scheduler — Environment Variables
|
|
# Copy this file to .env and fill in your values.
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
# ── Login (this tool's own login page, not your MassPrice account) ─
|
|
LOGIN_PASSWORD=changeme
|
|
|
|
# Secret key for Flask session signing — generate a random string:
|
|
# python3 -c "import secrets; print(secrets.token_hex(32))"
|
|
SECRET_KEY=change_this_to_a_random_secret_key
|
|
|
|
# ── Host port (what port Unraid exposes) ────────────────────────────
|
|
# Default is 5057 (arr-summary already uses 5056) — change if in use
|
|
HOST_PORT=5057
|
|
|
|
# ── Timezone ─────────────────────────────────────────────────────────
|
|
# Controls what "6:00 AM" means for your schedules
|
|
TZ=America/Phoenix
|
|
|
|
# ── Run verification polling ─────────────────────────────────────────
|
|
# After a run is confirmed sent, checks MassPrice's own Activity Log
|
|
# every VERIFY_POLL_MINUTES to see whether it actually completed,
|
|
# retrying up to VERIFY_MAX_ATTEMPTS times before giving up and marking
|
|
# it "Not Confirmed". MassPrice's processing time varies a lot in
|
|
# practice (observed anywhere from ~1 minute to over 20) and its queue
|
|
# can back up further under load — the default (5 min x 12 = up to an
|
|
# hour of patience) is a reasonable middle ground, not a guarantee.
|
|
VERIFY_POLL_MINUTES=5
|
|
VERIFY_MAX_ATTEMPTS=12
|
|
|
|
# ── Session-expiry email alert (optional) ───────────────────────────
|
|
# Sent once when the saved MassPrice session expires/is missing — not
|
|
# on every failed run, just the first one after it goes bad. Same
|
|
# Gmail-app-password pattern as lunch-notifier: GMAIL_APP_PASSWORD is a
|
|
# Gmail *app password* (Google Account → Security → App Passwords), not
|
|
# your real Gmail password — required since Gmail blocks plain SMTP auth
|
|
# with the account password. Leave blank to disable the alert entirely.
|
|
GMAIL_USER=
|
|
GMAIL_APP_PASSWORD=
|
|
# Defaults to GMAIL_USER if left blank
|
|
ALERT_EMAIL=
|