Repentance
Use scripts/repentance.py to execute pending punishments and update daily_punishments.
Run
uv run scripts/repentance.py
Inputs
This script takes no CLI arguments.
Environment
PAVLOK_TYPE_PUNISHis required (e.g.,zap,vibe,beep).PAVLOK_VALUE_PUNISHis required (integer).PUNISH_INTERVAL_SECis optional (integer, default1).PAVLOK_API_KEYis required byscripts/pavlok.py.- If using
zap,LIMIT_DAY_PAVLOK_COUNTSandLIMIT_PAVLOK_ZAP_VALUEare required.
Outputs
Prints a single line of JSON:
{"executed": 2}
Notes
- Processes
daily_punishmentsrows inpendingorfailedstate. - Marks rows
runningwhile executing, updatesexecuted_count, and setsfailedon errors or rate limits. - Always creates a new pending
daily_punishmentsrow after processing. - Database URL comes from
DATABASE_URL(default:sqlite:///./app.db).