Commit Graph

66 Commits (ab41db22b77a211e89e2b88a63a342f285d79868)

Author SHA1 Message Date
Snakes be1023f734
cron.py bugs: missing import; lottery edge case 2022-07-21 14:28:52 -04:00
Snakes 0fe1e57ecd
Fix cfa6c13ea: cron.py missing import. 2022-07-21 14:11:04 -04:00
Aevann1 a8fe49f232 kitchen sink commit, all over the place 2022-07-08 21:03:04 +02:00
Aevann1 cfa6c13eaa move 2 cron functions from routes files to .cron 2022-07-08 18:21:39 +02:00
Aevann1 b6ca73a0c5 testing 2022-07-02 11:30:17 +02:00
Aevann1 bc41bb5584 testing, pls ignore 2022-07-02 11:29:01 +02:00
Aevann1 a0cb5874cc refactor push notifs 2022-06-27 21:02:24 +02:00
Snakes d68f2a604a Check bot award timers more frequently.
Also: change to docker-compose.yml is to see if it'll fix the Github
tests failing. Lumped in here because it's too dumb to make a commit
for by itself.
2022-06-27 02:15:35 -04:00
Aevann1 1367d944da commit only when status code is 200 2022-06-26 07:37:36 +02:00
Aevann1 cff34fb3a4 reducing query volume, #2 2022-06-26 03:11:02 +02:00
Aevann1 d84a4c7ce9 convert monthly marseybux into a cron task 2022-06-10 22:23:01 +02:00
Snakes 5f7b38b477 Refactor stat timers, award timers.
Prior to this comment, the every-1d cron.py command was broken due
to lack of proper stats import. However, while refactoring this, it
was convenient to move other recurring tasks that had been stuffed in
odd places--not least `stats(...)`--into the new cron system. This
entailed a number of refactorings of other things.

1. Move stats(...) from static.py to helpers/stats.py.
2. Move hole inactivity purge task from stats(...) to routes/subs.py.
3. Move bot award timer checks from stats(...) to helpers/awards.py.
4. Unify award timer logic formerly in routes/front.py into the new
   helpers/awards.py.
2022-06-10 05:47:41 -04:00
Snakes 995375decc Refactor reddit mentions, move to cron.
The reddit mentions system contained much duplicated code and was
grafted onto the post thumbnail pipeline to achieve semi-regular
invocation. Instead, we now run it through the new cron system,
and the duplicate code has been refactored out.
2022-06-07 10:42:24 -04:00
Snakes 152315f73e cron: Move charts from static to helper. 2022-06-07 08:31:24 -04:00
Snakes ace0a62f69 cron: Add lottery as scheduled task. 2022-06-07 07:36:55 -04:00
Snakes acb3a0b338 Enable flask command, add cron target.
Adding an empty __init__.py, the imports-only cli.py, and setting
FLASK_APP in the environment are enough to get the `flask` command
to work. This will enable future changes, including database
migrations.

The proximate reason for the fix is to add a `flask cron` command
to run scheduled tasks within the application from cron. Specifically,
the lottery should be run from cron.
2022-06-07 06:57:26 -04:00