Commit Graph

248 Commits (master)

Author SHA1 Message Date
Aevann 809112b8e1 restore offsite_mentions_task 2023-09-11 20:26:30 +03:00
Aevann 7f1a713956 disable offsite_mentions_task temporarily 2023-09-09 21:57:59 +03:00
Aevann b1ae6a324a restore y'all-seeing-eye function using pullpush (initial commit) 2023-09-09 21:51:09 +03:00
Aevann b42b20d5bf fix localhost being impossible to use 2023-09-06 01:14:14 +03:00
Aevann 0b4582f2ae fix transaction timeout 2023-09-06 00:57:46 +03:00
Aevann 6c0935d6b9 refresh shit stored in redis when redis gets wiped 2023-09-06 00:53:43 +03:00
Aevann 1771728a3e fix old award name 2023-09-01 11:27:50 +03:00
Aevann 1664c82374 move yearly badges to cron 2023-08-31 13:09:18 +03:00
Aevann 8139b908f3 improve last commit 2023-08-23 00:44:06 +03:00
Aevann a9a68ae79d fix additional error due to flask patch 2023-08-23 00:43:36 +03:00
Aevann 3ec2038caf same as last commit 2023-08-11 16:15:34 +03:00
Aevann 3b24eca320 move emoji download buttons to /emojis 2023-08-05 16:52:53 +03:00
Aevann 02f36bdcaf move generate_charts_task 2023-08-05 16:45:13 +03:00
Aevann 3832da4554 fix last commit 2023-08-03 06:46:36 +03:00
Aevann fa7d137efa not even 1GB, amazing 2023-08-03 06:44:08 +03:00
Aevann e8acb1f6c1 fix last commit 2023-08-03 06:33:17 +03:00
Aevann 1280588283 add emojis_original_zip 2023-08-03 06:29:01 +03:00
Aevann 7fd46442d2 make !verifiecdrich a real ping group so ppl are able to leave it 2023-08-02 00:56:17 +03:00
Aevann 84191d224b move _sub_inactive_purge_task to the bottom since it has a flush 2023-08-02 00:56:17 +03:00
Aevann 8627bad918 boost /h/highrollerclub and exempt it from deletion 2023-08-01 09:54:41 +03:00
Aevann 0cb19d06cc fix missing import 2023-07-26 04:14:41 +03:00
Aevann 2f8fec6fff partially revert a94dda90dd. restore some commits that turned out to be necessary 2023-07-26 00:42:47 +03:00
Aevann a57ff00e09 make the site faster by not having GET endpoints waiting for UPDATE statements to finish (they can take really long bc of locks) 2023-07-26 00:26:34 +03:00
Aevann a94dda90dd remove unnecessary flushes 2023-07-25 23:35:54 +03:00
Aevann b35d3ac183 use the cron file in the repo 2023-07-23 18:04:52 +03:00
Aevann d0c7524154 put cron_fn in gevent to make it stop blocking 2023-07-23 00:31:44 +03:00
Aevann 7f6a45a5b6 run cron in localhost too 2023-07-22 20:11:07 +03:00
Aevann 3570c2304f add timestamp 2023-07-17 20:30:38 +03:00
Aevann 21fa8c7996 remove unused --every-1h cron flag 2023-07-17 17:47:46 +03:00
Aevann 54ace27323 remove every-1mo flag 2023-07-13 15:52:49 +03:00
Aevann f22a362f37 fix bug when both queen and namelock expire at the same time 2023-07-08 19:11:29 +03:00
Aevann bc419a52da restore shit i accidentially removed :marseybrainlet: 2023-07-08 18:58:16 +03:00
Aevann 36ff17a7d5 print-debug smth on wpd 2023-07-08 18:31:47 +03:00
Aevann 683d722426 move _award_timers_task() under everything else cuz it tends to break the most 2023-07-08 16:07:06 +03:00
Aevann 6dacba53b6 tinker with cache to stop insane cpu usage by redis-server 2023-07-07 22:08:23 +03:00
Aevann 97d6ba5d48 dont leave transactions open in cron 2023-07-05 20:01:39 +03:00
Aevann 225c63af0b same as last commit 2023-07-04 23:59:42 +03:00
Aevann ca2f50f7ce same as last commit 2023-07-04 23:52:00 +03:00
Aevann f249b1e158 fix i think 2023-07-04 23:44:41 +03:00
Aevann 963223495c urgent fix for cron award shit 2023-07-03 04:58:05 +03:00
Aevann 3e6622c511 cleanup in aisle 4 2023-07-03 03:26:20 +03:00
Aevann 25b9a0f535 stop usage of .update 2023-07-03 00:42:34 +03:00
Aevann dd37775c6b try moving _award_timers_task to every_1h 2023-07-02 22:51:16 +03:00
HeyMoon 36779a7ad1 Add the edgy award (and some other goodies) (#157)
# The Edgy Award
* Makes text bold, italic, and red, symbolizing the fire that burns within.
* Adds "fucking" to various places, after articles and prepositional phrases (I think) (tbh I just eyeballed it). EX: He is the fucking best
* Adds "motherfucker" and "bitch" to exclamations and questions, respectively.

# Goodies
* For the queen award:
	* based => comfy
    * Xpilled => x vibes
    * Xmaxxing => normalizing X

Co-authored-by: Chuck Sneed <sneed@formerlychucks.net>
Reviewed-on: #157
Co-authored-by: HeyMoon <heymoon@noreply.fsdfsd.net>
Co-committed-by: HeyMoon <heymoon@noreply.fsdfsd.net>
2023-06-26 14:38:48 +00:00
Aevann a15d5eabef rename "agendaposter" to "chud" 2023-06-23 14:07:47 +03:00
HeyMoon 5d53820515 Add the "Misogynist" award to harass incels (#154)
Whazzup? This PR is the final solution to the incel problem. There's an old indian proverb that says: "never judge a man until you've walked two moons in his mocassins". In this case, it should be: "never judge a woman until you've walked 24 hrs in her high-heels".

The misogynist award is a comment-transforming award that "feminizes" comments. It does the following:
 - makes text pink
 - makes text lowercase
 - removes "complicated" punctuation
 - makes paragraphs into run-on sentences
 - adds stereotypical girly remarks to the beginning or end of a paragraph.

For example:
INPUT

> What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little "clever" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.

OUTPUT
> im literally screaming, what the fuck did you just fucking say about me, you little bitch? ill have you know i graduated top of my class in the navy seals, and ive been involved in numerous secret raids on al-quaeda, and i have over 300 confirmed kills, i am trained in gorilla warfare and im the top sniper in the entire us armed forces, you are nothing to me but just another target, i will wipe you the fuck out with precision the likes of which has never been seen before on this earth, mark my fucking words, you think you can get away with saying that shit to me over the internet? think again, fucker, as we speak i am contacting my secret network of spies across the usa and your ip is being traced right now so you better prepare for the storm, maggot, the storm that wipes out the pathetic little thing you call your life, youre fucking dead, kid, i can be anywhere, anytime, and i can kill you in over seven hundred ways, and thats just with my bare hands, not only am i extensively trained in unarmed combat, but i have access to the entire arsenal of the united states marine corps and i will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit, if only you could have known what unholy retribution your little clever comment was about to bring down upon you, maybe you would have held your fucking tongue, but you couldnt, you didnt, and now youre paying the price, you goddamn idiot, i will shit fury all over you and you will drown in it, youre fucking dead, kiddo

It also sets the user's pfp to a random white woman. Well, psuedorandom - it's based off of the user's id, so each user will only ever have one pfp assigned to them, which I think is nifty.

Finally, it changes the name of the user toa girly name.

There is one small problem with the PR, which is simply that I manually added a badge for testing purposes. If you like this PR, I will submit the badge throught the proper chanels and fix it.

![image](/attachments/641c7276-ffe4-4e69-b3e9-aec9f4f94191)

Co-authored-by: Chuck Sneed <sneed@formerlychucks.net>
Reviewed-on: #154
Co-authored-by: HeyMoon <heymoon@noreply.fsdfsd.net>
Co-committed-by: HeyMoon <heymoon@noreply.fsdfsd.net>
2023-06-21 12:36:07 +00:00
Aevann 32fa466e6a rename submissions to posts 2023-06-08 02:26:32 +03:00
Aevann b2a906e043 consistency in award expiration messages 2023-05-19 17:20:01 +03:00
Aevann 91987cd080 add code for namelock badge 2023-05-16 03:20:55 +03:00
Aevann fc5af9c044 1. move _generate_emojis_zip and _leaderboard_task to every_1d, they take 6 and 5 seconds respectively and dont rly need to run every hour
2. remove time measuring statements
3. remove redundant commit at the end
2023-05-14 19:27:33 +03:00
Aevann 864f770762 add namelock award 2023-05-13 07:53:14 +03:00
Aevann 50b23a064a move award timers to cron 2023-05-13 05:00:54 +03:00
Aevann f3a0080698 remove useless tabs 2023-05-06 00:47:07 +03:00
Aevann c532019186 fix this https://rdrama.net/h/changelog/post/165657/changelog-megathread-marseynotes/4042713#context 2023-04-25 14:22:05 +02:00
Aevann b952de3cee restore "downvotes received" leaderboard 2023-04-25 11:50:47 +02:00
Aevann ac7db0106f move the resource-intensive part of "upvotes given" leaderboard to cron 2023-04-25 11:31:02 +02:00
Aevann 3796fa836c protect /h/museumofrdrama from automatic deletion 2023-04-23 04:53:12 +02:00
Aevann 96330210e8 use SITE as a prefix for flask_cache 2023-03-25 22:57:27 +02:00
Aevann 57765f0776 revert sqlalchemy changes 2023-03-16 08:27:58 +02:00
Aevann b2dc965846 more fixes 2023-03-15 07:29:59 +02:00
Aevann f768d81103 keep db sessions open 2023-03-15 05:58:00 +02:00
Aevann 729b095713 remove /h/masterbaiters 2023-03-13 20:53:08 +02:00
Aevann 83550c33bd fix last commit 2023-03-11 09:36:41 +02:00
Aevann c1b337dd00 move _generate_emojis_zip to 1hr 2023-03-02 03:54:06 +02:00
Aevann 00c70a23fb show number of emojis and the zip size 2023-02-25 21:18:40 +02:00
Aevann 61d256eaaa adds an easy link to download all emojis 2023-02-25 01:14:18 +02:00
Aevann 8329287150 make countryclub and masterbaiters immune to deletion 2023-02-06 06:30:21 +02:00
Aevann b7e4f27f65 use transactions table in rdrama 2023-02-01 21:04:15 +02:00
Aevann b0832d9ef6 update marseybux message 2023-02-01 20:41:52 +02:00
Aevann d39093b286 fix marseybux disbursing 2023-02-01 20:35:42 +02:00
Aevann d34f836052 make patron rewards automatic in WPD 2023-01-23 10:42:38 +02:00
Aevann 568e2ddbe8 change hole neglector description 2022-12-24 20:55:26 +02:00
Aevann1 3ae5292ce4 remove pcm from code 2022-12-21 14:42:41 +02:00
Aevann1 9b7c0a674b fix /stats 2022-12-21 01:44:53 +02:00
Aevann1 11ed781b7a wtf? 2022-12-21 01:30:05 +02:00
Aevann1 1b7eb7cb87 Revert "add print statements for debugging /stats"
This reverts commit a7ec033698.
2022-12-21 01:00:26 +02:00
Aevann1 a7ec033698 add print statements for debugging /stats 2022-12-21 00:50:51 +02:00
Aevann1 6d9171bdae fix prev commit 2022-12-20 04:30:42 +02:00
Aevann1 c3dc1dc20e add missing import 2022-12-20 04:29:04 +02:00
Aevann1 74457e5468 rework stats a bit 2022-12-20 04:26:27 +02:00
Aevann1 69dee20918 Revert "print debugging for stats"
This reverts commit 02bb36159f.
2022-12-20 03:01:14 +02:00
Aevann1 02bb36159f print debugging for stats 2022-12-20 03:00:33 +02:00
justcool393 ab41db22b7 [DO NOT MERGE] multiple sub banners (#59)
allows multiple sub banners

Snakes note: By request of Carp, especially for WPD.

Co-authored-by: justcool393 <justcool393@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #59
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-11 23:44:34 +00:00
Aevann1 7d317e1fa8 if /h/programming assimilates, move its posts to /h/slackernews 2022-12-10 16:00:58 +02:00
Snakes 4585323275
Fix monthly jannie patron badge granting. 2022-11-30 23:38:25 -05:00
justcool393 272e2ee936
sneed (rename procoins to marseybux) (#472)
* sneed (rename procoins to marseybux)

* literally unusable

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 18:08:29 -05:00
Snakes db329f487f
User.pay_account everywhere, fix lottery payout. 2022-11-20 05:50:02 -05:00
Aevann1 bcfe98c295 remove hole pins when post moved 2022-11-18 21:58:12 +02:00
Aevann1 532ebd3ac8 standardize g.db behavior 2022-11-15 17:39:00 +02:00
justcool393 8f2f48d6d1
[DO NOT MERGE] import detanglation (#442)
* move Base definition to files.classes.__init__.py

* fix ImportError

* move userpage listing to users.py

* don't import the app from classes

* consts: set default values to avoid crashes
consts: warn if the secret key is the default config value

* card view: sneed (user db schema)

* cloudflare: use DEFAULT_CONFIG_VALUE

* const: set default values

* decouple media.py from __main__

* pass database to avoid imports

* import cleanup and import request not in const, but in the requests mega import

* move asset_submissions site check to __init__

* asset submissions feature flag

* flag

* g.is_tor

* don't import request where it's not needed

* i think this is fine

* mail: move to own routes and helper

* wrappers

* required wrappers move

* unfuck wrappers a bit

* move snappy quotes and marseys to stateful consts

* marsify

* :pepodrool:

* fix missing import

* import cache

* ...and settings.py

* and static.py

* static needs cache

* route

* lmao all of the jinja shit was in feeds.py amazing

* classes should only import what they need from flask

* import Response

* hdjbjdhbhjf

* ...

* dfdfdfdf

* make get a non-required import

* isort imports (mostly)

* but actually

* configs

* reload config on import

* fgfgfgfg

* config

* config

* initialize snappy and test

* cookie of doom debug

* edfjnkf

* xikscdfd

* debug config

* set session cookie domain, i think this fixes the can't login bug

* sdfbgnhvfdsghbnjfbdvvfghnn

* hrsfxgf

* dump the entire config on a request

* kyskyskyskyskyskyskyskyskys

* duifhdskfjdfd

* dfdfdfdfdfdfdfdfdfdfdfdf

* dfdfdfdf

* imoprt all of the consts beacuse fuck it

* 😭

* dfdfdfdfdfdfsdasdf

* print the entire session

* rffdfdfjkfksj

* fgbhffh

* not the secret keys

* minor bug fixes

* be helpful in the warning

* gfgfgfg

* move warning lower

* isort main imports (i hope this doesn't fuck something up)

* test

* session cookie domain redux

* dfdfdfd

* try only importing Flask

* formkeys fix

* y

* :pepodrool:

* route helper

* remove before flight

* dfdfdfdfdf

* isort classes

* isort helpers

* move check_for_alts to routehelpers and also sort imports and get rid of unused ones

* that previous commit but actkally

* readd the cache in a dozen places they were implicitly imported

* use g.is_tor instead of request.headers. bla bla bla

* upgrade streamers to their own route file

* get rid of unused imports in __main__

* fgfgf

* don't pull in the entire ORM where we don't need it

* features

* explicit imports for the get helper

* explicit imports for the get helper redux

* testing allroutes

* remove unused import

* decouple flask from classes

* syntax fix also remember these have side fx for some reason (why?)

* move side effects out of the class

* posts

* testing on devrama

* settings

* reloading

* settingssdsdsds

* streamer features

* site settings

* testing settings on devrama

* import

* fix modlog

* remove debug stuff

* revert commit 67275b21ab6e2f2520819e84d10bfc1c746a15b6

* archiveorg to _archiveorg

* skhudkfkjfd

* fix cron for PCM

* fix bugs that snekky wants me to

* Fix call to realbody passing db, standardize kwarg

* test

* import check_for_alts from the right place

* cloudflare

* testing on devrama

* fix cron i think

* shadow properly

* tasks

* Remove print which will surely be annoying in prod.

* v and create new session

* use files.classes

* make errors import little and fix rare 500 in /allow_nsfw

* Revert "use files.classes"

This reverts commit 98c10b876cf86ce058b7fb955cf1ec0bfb9996c6.

* pass v to media functions rather than using g

* fix

* dfdfdfdfd

* cleanup, py type checking is dumb so don't use it where it causes issues

* Fix some merge bugs, add DEFAULT_RATELIMIT to main.

* Fix imports on sqlalchemy expressions.

* `from random import random` is an error.

* Fix replies db param.

* errors: fix missing import

* fix rare 500: only send to GIFT_NOTIF_ID if it exists, and send them the right text

* Fix signup formkey.

* fix 2 500s

* propagate db to submissions

* fix replies

* dfdfdfdf

* Fix verifiedcolor.

* is_manual

* can't use getters outside of an app context

* don't attempt to do gumroad on sites where it's not enabled

* don't attempt to do gumraod on sites's where it's unnecessary

* Revert "don't attempt to do gumroad on sites where it's not enabled"

This reverts commit 6f8a6331878655492dfaf1907b27f8be513c14d3.

* fix 500

* validate media type

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-15 03:19:08 -06:00
Snakes 4aedbc9b2e
Fix imports for sub move frontlist invalidation. 2022-11-14 04:14:41 -05:00
Aevann1 e83be235ba delete frontpage cache when moving posts 2022-11-14 07:49:23 +02:00
justcool393 f4f03f6582
all seeing eye: rework reddit notifs a bit (#445)
* all seeing eye: rework reddit notifs a bit
this should be more reliable and catch more of these when they're sent

* fix reddit notifs to properly use fewer queries
2022-11-13 06:00:05 -05:00
Snakes 38c3ba3889 Fix hole inactivity deletion to include subactions. 2022-11-06 01:08:24 -04:00
Aevann1 086643bf79 give_monthly_marseybux_task fixes 2022-11-02 08:19:25 +02:00
Aevann1 a2eaece906 verify patron level before giving monthly marsybux 2022-11-02 07:54:38 +02:00
justcool393 6caebac946 actions: move user-only actions to useractions, which gets rid of a circular dependency 2022-11-01 18:46:56 -05:00
Snakes 7ea61f423d
PCM: disable gambling; extend FEATURES['GAMBLING']. 2022-10-07 20:31:46 -04:00
justcool393 57b08043a4 notification settings and admin setting 2022-10-05 21:40:02 -07:00
Aevann1 337e5d59c5 Revert "make house holes immune from deletion"
This reverts commit 7defcd07cf.
2022-10-04 15:48:08 +02:00
justcool393 7defcd07cf
make house holes immune from deletion 2022-10-03 20:22:16 -07:00
Snakes 4a54c6219a
Add trailing final newlines to source files.
Touched a ton of files to finally standardize on having trailing
final newlines, as best practice recommends and so our devs stop
accidentally fighting each other over it.

This was performed automatically with the following:
git ls-files -z '*.py' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
git ls-files -z '*.css' | while IFS= read -rd '' f; \
    do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2022-09-29 01:43:29 -04:00
Aevann1 37e1f25624 make using proxies only happen in 3 circumstances again 2022-09-26 06:01:25 +02:00
Aevann1 4212cfa0b2 testing on pcm 2022-09-25 06:11:06 +02:00
Aevann1 dd0f8fbed7 proxy all requests we make 2022-09-25 05:23:50 +02:00
Aevann1 f4b41f0049 make addition and removal of channels happen instantly (testing in devrama) 2022-09-25 05:08:44 +02:00
Aevann1 a63d4940ae fix PCM /live list 2022-09-23 22:58:10 +02:00
Snakes 1cf5ec9e0d Revert "PCM: update live list in background."
This reverts commit 3acdb44a98.
2022-09-23 15:41:04 -04:00
Snakes 3acdb44a98
PCM: update live list in background. 2022-09-22 19:39:26 -04:00
Aevann1 55ca68e6fb same as last commit 2022-09-22 07:17:16 +02:00
Aevann1 40485e9ab6 fix cron (im stoopid) 2022-09-22 07:15:55 +02:00
Aevann1 c02e1bd76f fix cron 2022-09-22 07:11:50 +02:00
Aevann1 9220424324 fix cron 2022-09-22 07:08:58 +02:00
Aevann1 77fa9de79a fix cronjob 2022-09-22 07:02:10 +02:00
Aevann1 553218aaa5 make /live a cached cron job 2022-09-22 04:33:45 +02:00
Aevann1 6e3e05c6e1 tweak last commit 2022-09-20 04:55:38 +02:00
Aevann1 1a8439b461 add cron task to give monthly marseybux in WPD 2022-09-20 04:49:46 +02:00
Aevann1 f54791cc4c remove categories 2022-09-19 20:04:30 +02:00
Aevann1 da5db208f6 sneed 2022-09-13 02:00:02 +00:00
outruncolors 7d8cfe5576
Add Roulette (#351)
* Add roulette file

* Rename variable to avoid name collission

* Add basic route and create new template for game

* More work on the roulette template

* Initial connection of front-end roulette to back-end roulette

* Add to cron job

* Pass bets to the front end

* Update front-end looks

* Add stackable poker chips for bets

* Minor last changes

* Handle minimum bets

* Add bet table
2022-09-12 20:07:39 -05:00
Snakes e1c44d99d5
cron.py: hole inactivity criteria, stealth fix.
Two bugs:
  1) Drafts, deleted posts, and removed posts counted toward hole
     aliveness. This has been fixed.
  2) Foreign key constraints in sub_joins weren't getting deleted,
     so stealth holes couldn't be deleted.

Both of these conspired to keep /h/smuggies alive, so they must be
fixed.
2022-09-07 18:29:40 -04:00
Aevann1 6201a79df0 fix gumroad for humbdolt 2022-09-02 02:48:15 +02:00
Aevann1 6a21dd347b Revert "Revert "Revert "restore autoflush"""
This reverts commit d84b26fc77.
2022-08-25 17:04:33 +02:00
Snakes f0becbd26e
Fix hole neglecter logic & missing imports.
Amends 69903bb94b and c3109601f4 after local testing.
2022-08-24 16:38:44 -04:00
Aevann1 c3109601f4 fix previous commit (thx sneks) 2022-08-24 22:30:31 +02:00
Aevann1 69903bb94b grant "Hole Neglector" badge automatically 2022-08-24 22:26:41 +02:00
Aevann1 d84b26fc77 Revert "Revert "restore autoflush""
This reverts commit 5aa03d87bb.
2022-08-24 16:36:44 +02:00
Aevann1 5aa03d87bb Revert "restore autoflush"
This reverts commit 687cd766b9.
2022-08-23 17:17:37 +02:00
Aevann1 687cd766b9 restore autoflush 2022-08-17 18:36:59 +02:00
Aevann1 db8a3013a1 better approach for last commit 2022-08-14 08:12:34 +02:00
Aevann1 64594b48eb fix what sneks said about hole deletion crash when one of the mods is a site janny 2022-08-14 08:05:24 +02:00
Snakes 390acb66e0
cron.py: fix missing import, preserve /h/changelog.
Multiple closely related issues:
  - When sub_inactive_purge_task was moved to cron.py, a number of
    imports were not added. Notably, missing helpers/alerts.py.
    This led to hole inactivity deletions not taking place.
  - However, this proved useful: the hole it's been trying to delete
    the past few days was /h/changelog. This has now been excluded
    from deletion.
  - Finally, the missing import would've meant the monthly procoins
    disbursement would fail when it runs in a couple days. This has
    likewise been fixed.
2022-07-29 15:12:56 -04:00
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