forked from MarseyWorld/MarseyWorld
testing
parent
bc41bb5584
commit
b6ca73a0c5
|
@ -8,7 +8,7 @@ import files.helpers.stats as stats
|
||||||
import files.helpers.awards as awards
|
import files.helpers.awards as awards
|
||||||
import files.routes.static as route_static
|
import files.routes.static as route_static
|
||||||
from files.routes.subs import sub_inactive_purge_task
|
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
|
from sys import stdout
|
||||||
|
|
||||||
|
@ -33,8 +33,7 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
|
||||||
sub_inactive_purge_task()
|
sub_inactive_purge_task()
|
||||||
|
|
||||||
if every_1mo:
|
if every_1mo:
|
||||||
#give_monthly_marseybux_task()
|
give_monthly_marseybux_task()
|
||||||
migrate_polls()
|
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
g.db.close()
|
g.db.close()
|
||||||
|
|
|
@ -50,8 +50,10 @@ def give_monthly_marseybux_task():
|
||||||
return True
|
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()
|
polls = g.db.query(Comment).filter_by(author_id=6176, parent_comment_id=None, parent_submission=77232).all()
|
||||||
for c in polls:
|
for c in polls:
|
||||||
print(c.id, flush=True)
|
print(c.id, flush=True)
|
||||||
|
@ -74,6 +76,7 @@ def migrate_polls():
|
||||||
g.db.delete(c)
|
g.db.delete(c)
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
return 'test'
|
||||||
|
|
||||||
@app.post('/kippy')
|
@app.post('/kippy')
|
||||||
@admin_level_required(3)
|
@admin_level_required(3)
|
||||||
|
|
Loading…
Reference in New Issue