user.billing_job: handle CancelledError

This commit is contained in:
Luna Mendes 2018-11-17 00:03:18 -03:00
parent bf661fa237
commit 404720c54d
1 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
this file only serves the periodic payment job code.
"""
import datetime
from asyncio import sleep
from asyncio import sleep, CancelledError
from logbook import Logger
from litecord.blueprints.user.billing import (
@ -98,4 +98,7 @@ async def payment_job(app):
log.exception('error while processing user payments')
log.debug('rescheduling..')
try:
await _resched(app)
except CancelledError:
log.info('cancelled while waiting for resched')