set default log level to warn, fix clean_nonces not working

This commit is contained in:
Jens Langhammer 2019-04-11 10:43:13 +02:00
parent 9b8f390e31
commit b369eb28f1
2 changed files with 3 additions and 3 deletions

View File

@ -15,8 +15,8 @@ data:
port: '' port: ''
log: log:
level: level:
console: DEBUG console: WARNING
file: DEBUG file: WARNING
file: /dev/null file: /dev/null
syslog: syslog:
host: 127.0.0.1 host: 127.0.0.1

View File

@ -24,5 +24,5 @@ def send_email(to_address, subject, template, context):
@CELERY_APP.task() @CELERY_APP.task()
def clean_nonces(): def clean_nonces():
"""Remove expired nonces""" """Remove expired nonces"""
amount = Nonce.objects.filter(expires__lt=datetime.now(), expiring=True).delete() amount, _ = Nonce.objects.filter(expires__lt=datetime.now(), expiring=True).delete()
LOGGER.debug("Deleted expired %d nonces", amount) LOGGER.debug("Deleted expired %d nonces", amount)