fix(logging): procrastinate job logs not showing up

This commit is contained in:
Herculino Trotta
2025-02-08 04:18:33 -03:00
parent 942154480e
commit 86112931d9
2 changed files with 4 additions and 15 deletions

View File

@@ -277,27 +277,16 @@ if "procrastinate" in sys.argv:
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"procrastinate": {
"format": "[%(asctime)s] - %(levelname)s - %(name)s - %(message)s -> %(procrastinate)s",
"datefmt": "%Y-%m-%d %H:%M:%S",
},
"standard": {
"format": "[%(asctime)s] - %(levelname)s - %(name)s - %(message)s",
"datefmt": "%Y-%m-%d %H:%M:%S",
},
},
"filters": {
"procrastinate": {
"()": "WYGIWYH.logs.ProcrastinateFilter.ProcrastinateFilter",
"name": "procrastinate",
},
},
"handlers": {
"procrastinate": {
"level": "INFO",
"class": "logging.StreamHandler",
"formatter": "procrastinate",
"filters": ["procrastinate"],
"formatter": "standard",
},
"console": {
"class": "logging.StreamHandler",
@@ -308,10 +297,10 @@ if "procrastinate" in sys.argv:
"loggers": {
"procrastinate": {
"handlers": ["procrastinate"],
"propagate": True,
"propagate": False,
},
"root": {
"handlers": None,
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},

View File

@@ -12,4 +12,4 @@ done
rm -f /tmp/migrations_complete
exec python manage.py procrastinate worker
exec watchfiles --filter python "python manage.py procrastinate worker"