root: bump celery messages to info
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ff481ba6e7
commit
e3129c1067
|
@ -37,7 +37,7 @@ def config_loggers(*args, **kwargs):
|
||||||
def after_task_publish_hook(sender=None, headers=None, body=None, **kwargs):
|
def after_task_publish_hook(sender=None, headers=None, body=None, **kwargs):
|
||||||
"""Log task_id after it was published"""
|
"""Log task_id after it was published"""
|
||||||
info = headers if "task" in headers else body
|
info = headers if "task" in headers else body
|
||||||
LOGGER.debug("Task published", task_id=info.get("id", ""), task_name=info.get("task", ""))
|
LOGGER.info("Task published", task_id=info.get("id", ""), task_name=info.get("task", ""))
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
|
@ -48,14 +48,14 @@ def task_prerun_hook(task_id: str, task, *args, **kwargs):
|
||||||
LOCAL.authentik_task = {
|
LOCAL.authentik_task = {
|
||||||
"request_id": request_id,
|
"request_id": request_id,
|
||||||
}
|
}
|
||||||
LOGGER.debug("Task started", task_id=task_id, task_name=task.__name__)
|
LOGGER.info("Task started", task_id=task_id, task_name=task.__name__)
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
@task_postrun.connect
|
@task_postrun.connect
|
||||||
def task_postrun_hook(task_id, task, *args, retval=None, state=None, **kwargs):
|
def task_postrun_hook(task_id, task, *args, retval=None, state=None, **kwargs):
|
||||||
"""Log task_id on worker"""
|
"""Log task_id on worker"""
|
||||||
LOGGER.debug("Task finished", task_id=task_id, task_name=task.__name__, state=state)
|
LOGGER.info("Task finished", task_id=task_id, task_name=task.__name__, state=state)
|
||||||
if not hasattr(LOCAL, "authentik_task"):
|
if not hasattr(LOCAL, "authentik_task"):
|
||||||
return
|
return
|
||||||
for key in list(LOCAL.authentik_task.keys()):
|
for key in list(LOCAL.authentik_task.keys()):
|
||||||
|
|
Reference in New Issue