File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
pythonkr_backend/pythonkr_backend/settings Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ gunicorn --workers=2 \
61
61
pythonkr_backend.wsgi
62
62
63
63
# start celery worker with beat
64
- celery -A pythonkr_backend multi start worker1 -c2 -B \
64
+ celery -A pythonkr_backend multi start worker -c2 -B \
65
65
--loglevel=info \
66
66
--pidfile=/home/pk/celery-%n.pid \
67
67
--logfile=/home/pk/logs/celery-%n-%i.log
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
+
64
69
# logfire settings
65
70
if IS_PRODUCTION_SERVER :
66
71
logfire .configure (environment = 'prod' , service_name = "web" , service_version = sha_service_version )
67
72
logfire .instrument_django ()
68
73
logfire .instrument_system_metrics ()
69
- #logfire.instrument_psycopg('psycopg')
74
+ #logfire.instrument_psycopg('psycopg')
70
75
print (f"sys.argv: { sys .argv } " )
71
76
72
77
# celery
You can’t perform that action at this time.
0 commit comments