vanth/vanth/celery_worker.py

19 lines
397 B
Python

import logging
import celery
import celery.signals
import vanth.main
from vanth.celery import app
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
config = vanth.main.get_config()
vanth.main.create_db_connection(config)
@celery.signals.setup_logging.connect
def on_logging(*args, **kwargs):
logging.getLogger().setLevel(logging.DEBUG)
LOGGER.info("Logging has been set up")