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: ''
log:
level:
console: DEBUG
file: DEBUG
console: WARNING
file: WARNING
file: /dev/null
syslog:
host: 127.0.0.1

View File

@ -24,5 +24,5 @@ def send_email(to_address, subject, template, context):
@CELERY_APP.task()
def clean_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)