authentik/passbook/lib/tasks.py

15 lines
324 B
Python
Raw Normal View History

"""passbook misc tasks"""
from django.core import management
from structlog import get_logger
from passbook.root.celery import CELERY_APP
LOGGER = get_logger()
2019-12-31 11:51:16 +00:00
@CELERY_APP.task()
def backup_database():
"""Backup database"""
2019-12-31 11:51:16 +00:00
management.call_command("dbbackup")
LOGGER.info("Successfully backed up database.")