Skip to content

Commit

Permalink
Separates the decorator from the injected uwsgi package to fix
Browse files Browse the repository at this point in the history
'process_is_uwsgi' logic.
  • Loading branch information
dannon committed Aug 15, 2016
1 parent 7c5cadb commit efbd8f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/util/postfork.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
# uwsgi-managed process.
try:
import uwsgi
from uwsgidecorators import postfork
if uwsgi.numproc:
process_is_uwsgi = True
except ImportError:
# This is not a uwsgi process, or something went horribly wrong.
process_is_uwsgi = False

try:
from uwsgidecorators import postfork
except:
def pf_dec(func):
return func
postfork = pf_dec
Expand Down

0 comments on commit efbd8f2

Please sign in to comment.