File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
pythonkr_backend/pythonkr_backend Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 22
22
23
23
@worker_init .connect ()
24
24
def init_worker (* args , ** kwargs ):
25
- logfire .configure (service_name = "celery-worker" , send_to_logfire = 'if-token-present' )
25
+ logfire .configure (environment = 'prod' , service_name = "celery-worker" , send_to_logfire = 'if-token-present' )
26
26
logfire .instrument_celery ()
27
27
logfire .instrument_pydantic_ai ()
28
28
29
29
@beat_init .connect ()
30
30
def init_beat (* args , ** kwargs ):
31
- logfire .configure (service_name = "celery-beat" , send_to_logfire = 'if-token-present' )
31
+ logfire .configure (environment = 'prod' , service_name = "celery-beat" , send_to_logfire = 'if-token-present' )
32
32
logfire .instrument_celery ()
33
33
logfire .instrument_pydantic_ai ()
Original file line number Diff line number Diff line change 61
61
# check WSGI environment
62
62
IS_PRODUCTION_SERVER = os .environ .get ('IS_WSGI_ENVIRONMENT' , 'False' ) == 'True'
63
63
64
- IN_CELERY_WORKER_PROCESS = sys .argv and 'worker' in sys .argv
65
-
66
- if IN_CELERY_WORKER_PROCESS :
67
- print ('Im in Celery worker' )
68
-
69
64
# logfire settings
70
65
if IS_PRODUCTION_SERVER :
71
66
logfire .configure (environment = 'prod' , service_name = "web" , service_version = sha_service_version )
72
67
logfire .instrument_django ()
73
68
logfire .instrument_system_metrics ()
74
- #logfire.instrument_psycopg('psycopg')
75
- print (f"sys.argv: { sys .argv } " )
76
69
77
70
# celery
78
71
CELERY_BROKER_PASSWORD = os .environ .get ("CELERY_BROKER_PASSWORD" ,"FALSE" )
You can’t perform that action at this time.
0 commit comments