File tree Expand file tree Collapse file tree 6 files changed +1
-115
lines changed Expand file tree Collapse file tree 6 files changed +1
-115
lines changed Original file line number Diff line number Diff line change 44
55import sentry_sdk
66from celery import Celery
7- from celery .signals import setup_logging
87from sentry_sdk .integrations .celery import CeleryIntegration
98
109from concordia .version import get_concordia_version
2827# should have a `CELERY_` prefix.
2928app .config_from_object ("django.conf:settings" , namespace = "CELERY" )
3029
31-
32- # Celery won't be default use the logging settings
33- # This configures Celery's logging to use our settings
34- @setup_logging .connect
35- def configure_logging (** kwargs ):
36- import logging .config
37-
38- from django .conf import settings
39-
40- logging .config .dictConfig (settings .LOGGING )
41-
42-
4330# Load task modules from all registered Django app configs.
4431app .autodiscover_tasks ()
Original file line number Diff line number Diff line change 253253 "datefmt" : "%Y-%m-%dT%H:%M:%S" ,
254254 "style" : "{" ,
255255 },
256- "celery" : {
257- "format" : "[%(asctime)s: %(levelname)s/%(processName)s]%(task_id)s "
258- "%(name)s: %(message)s" ,
259- "datefmt" : "%Y-%m-%d %H:%M:%S" ,
260- },
261256 "short" : {
262257 "format" : "[{levelname} {name}] {message}" ,
263258 "datefmt" : "%Y-%m-%dT%H:%M:%S" ,
264259 "style" : "{" ,
265260 },
266261 },
267- "filters" : {
268- "celery_task_id" : {
269- "()" : "importer.logging.CeleryTaskIDFilter" ,
270- },
271- },
272262 "handlers" : {
273263 "stream" : {
274264 "class" : "logging.StreamHandler" ,
289279 "level" : "INFO" ,
290280 "class" : "logging.handlers.RotatingFileHandler" ,
291281 "filename" : f"{ SITE_ROOT_DIR } /logs/celery.log" ,
292- "formatter" : "celery " ,
282+ "formatter" : "long " ,
293283 "maxBytes" : 1024 * 1024 * 100 , # 100 mb
294- "filters" : ["celery_task_id" ],
295284 },
296285 },
297286 "loggers" : {
Original file line number Diff line number Diff line change 11from __future__ import absolute_import , unicode_literals
22
33from celery import Celery
4- from celery .signals import setup_logging
54
65app = Celery ("importer" )
76
1110# should have a `CELERY_` prefix.
1211app .config_from_object ("django.conf:settings" , namespace = "CELERY" )
1312
14-
15- # Celery won't be default use the logging settings
16- # This configures Celery's logging to use our settings
17- @setup_logging .connect
18- def configure_logging (** kwargs ):
19- import logging .config
20-
21- from django .conf import settings
22-
23- logging .config .dictConfig (settings .LOGGING )
24-
25-
2613# Load task modules from all registered Django app configs.
2714app .autodiscover_tasks ()
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments