15 lines
324 B
Python
15 lines
324 B
Python
"""passbook misc tasks"""
|
|
from django.core import management
|
|
from structlog import get_logger
|
|
|
|
from passbook.root.celery import CELERY_APP
|
|
|
|
LOGGER = get_logger()
|
|
|
|
|
|
@CELERY_APP.task()
|
|
def backup_database():
|
|
"""Backup database"""
|
|
management.call_command("dbbackup")
|
|
LOGGER.info("Successfully backed up database.")
|