testsAndMisc/python_pkg/screen_locker/_constants.py
Krzysztof kuhy Rudnicki ead6072eee refactor: remove manual workout forms, ADB-only verification + sick mode
- Remove _workout_forms.py and all manual running/strength workout forms
- Verification is now ADB-only: phone check → verified (unlock) | failed (retry + sick mode)
- Add systemd timer (workout-locker.timer) for periodic 15min checks
- Fix service unit: add PYTHONPATH, WorkingDirectory, use -m invocation
- Update install/remove scripts for timer support
- Remove form-related constants, tests, and conftest helpers
- 127 tests, 100% branch coverage maintained
2026-03-27 15:54:01 +01:00

19 lines
681 B
Python

"""Constants for the screen locker module."""
from __future__ import annotations
from pathlib import Path
SICK_LOCKOUT_SECONDS = 120 # 2 minutes wait when sick
PHONE_PENALTY_DELAY_DEMO = 10
PHONE_PENALTY_DELAY_PRODUCTION = 600
ADB_TIMEOUT = 15
STRONGLIFTS_DB_REMOTE = (
"/data/data/com.stronglifts.app/databases/StrongLifts-Database-3"
)
SHUTDOWN_CONFIG_FILE = Path("/etc/shutdown-schedule.conf")
# Helper script path (relative to this file)
ADJUST_SHUTDOWN_SCRIPT = Path(__file__).resolve().parent / "adjust_shutdown_schedule.sh"
# State file to track sick day usage and original config values
SICK_DAY_STATE_FILE = Path(__file__).resolve().parent / "sick_day_state.json"