This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2019-10-15 11:52:33 +00:00
|
|
|
"""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
|
|
|
|
2019-10-15 11:52:33 +00:00
|
|
|
@CELERY_APP.task()
|
2020-09-28 22:27:58 +00:00
|
|
|
def backup_database(): # pragma: no cover
|
2019-10-15 11:52:33 +00:00
|
|
|
"""Backup database"""
|
2019-12-31 11:51:16 +00:00
|
|
|
management.call_command("dbbackup")
|
|
|
|
LOGGER.info("Successfully backed up database.")
|