Massprice/gunicorn.conf.py
Barely Removable 2fdb9be9b9
Some checks failed
Deploy / deploy (push) Failing after 51s
Initial scaffold: Flask webui + APScheduler + Playwright automation for MassPrice rule scheduling
Drives massprice.tcgplayer.com's Run Rule action per-rule on a
user-configured schedule (multiple times/day, day-of-week toggles),
replacing MassPrice's native scheduler (capped at 15 schedules
account-wide, one run/day, with observed clock drift). Deployed via
Forgejo push-to-deploy on Unraid, matching arr-summary/card-grader.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
2026-08-31 17:31:53 -07:00

13 lines
465 B
Python

# Gunicorn configuration
import os
# Exactly one worker: APScheduler and the Playwright run-queue live in
# process memory, not a shared store — a second worker would duplicate
# every scheduled job and run each rule twice. Fine for a low-traffic
# single-user admin tool.
workers = 1
threads = 4
worker_class = "gthread"
bind = "0.0.0.0:" + os.environ.get("PORT", "5000")
timeout = 120 # a rule run launches Chromium, logs in, and clicks through
keepalive = 5