From 1288e401ea358d2c6a528e2c172fa728f7b60da6 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Sat, 17 Nov 2018 18:29:55 -0300 Subject: [PATCH] user.billing_job: change reschedule for payment_job from 2min to 30min --- litecord/blueprints/user/billing_job.py | 5 +++-- litecord/types.py | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/litecord/blueprints/user/billing_job.py b/litecord/blueprints/user/billing_job.py index 79ffe48..a89de2e 100644 --- a/litecord/blueprints/user/billing_job.py +++ b/litecord/blueprints/user/billing_job.py @@ -10,6 +10,7 @@ from litecord.blueprints.user.billing import ( ) from litecord.snowflake import snowflake_datetime +from litecord.types import MINUTES log = Logger(__name__) @@ -24,8 +25,8 @@ THRESHOLDS = { async def _resched(app): - log.debug('waiting 2 minutes for job.') - await sleep(120) + log.debug('waiting 30 minutes for job.') + await sleep(30 * MINUTES) app.sched.spawn(payment_job(app)) diff --git a/litecord/types.py b/litecord/types.py index ed2b366..8b3a5bf 100644 --- a/litecord/types.py +++ b/litecord/types.py @@ -1,5 +1,10 @@ +# size units KILOBYTES = 1024 +# time units +MINUTES = 60 +HOUR = 60 * MINUTES + class Color: """Custom color class"""