master
Aevann1 2022-07-02 11:30:17 +02:00
parent bc41bb5584
commit b6ca73a0c5
2 changed files with 6 additions and 4 deletions

View File

@ -8,7 +8,7 @@ import files.helpers.stats as stats
import files.helpers.awards as awards
import files.routes.static as route_static
from files.routes.subs import sub_inactive_purge_task
from files.routes.admin import give_monthly_marseybux_task, migrate_polls
from files.routes.admin import give_monthly_marseybux_task
from sys import stdout
@ -33,8 +33,7 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
sub_inactive_purge_task()
if every_1mo:
#give_monthly_marseybux_task()
migrate_polls()
give_monthly_marseybux_task()
g.db.commit()
g.db.close()

View File

@ -50,8 +50,10 @@ def give_monthly_marseybux_task():
return True
def migrate_polls():
@app.post('/migrate_polls')
@admin_level_required(3)
def migrate_polls(v):
polls = g.db.query(Comment).filter_by(author_id=6176, parent_comment_id=None, parent_submission=77232).all()
for c in polls:
print(c.id, flush=True)
@ -74,6 +76,7 @@ def migrate_polls():
g.db.delete(c)
g.db.commit()
return 'test'
@app.post('/kippy')
@admin_level_required(3)