File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -259,12 +259,13 @@ def get_application_name(self):
259259
260260 basename = os .path .basename (sys .argv [0 ])
261261 if basename == "gunicorn" :
262- # gunicorn renames their processes to pretty things - we use those by default
263- # gunicorn: master [djface.wsgi]
264- # gunicorn: worker [djface.wsgi]
265- app_name = get_proc_cmdline (as_string = True )
266-
267- if app_name is None :
262+ if 'setproctitle' in sys .modules :
263+ # With the setproctitle package, gunicorn renames their processes
264+ # to pretty things - we use those by default
265+ # gunicorn: master [djface.wsgi]
266+ # gunicorn: worker [djface.wsgi]
267+ app_name = get_proc_cmdline (as_string = True )
268+ else :
268269 app_name = basename
269270 elif "FLASK_APP" in os .environ :
270271 app_name = os .environ ["FLASK_APP" ]
You can’t perform that action at this time.
0 commit comments