Skip to content

Commit

Permalink
Workaround for issue #25 , running flask in debug mode causing schedu…
Browse files Browse the repository at this point in the history
…ler to fail
  • Loading branch information
indy-independence committed Aug 12, 2019
1 parent fec1cb7 commit 8e01d06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cnaas_nms/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def __init__(self):
try:
fcntl.lockf(self.lock_f, fcntl.LOCK_EX | fcntl.LOCK_NB)
except BlockingIOError:
self.use_mule = True
try:
import uwsgi
except Exception:
self.use_mule = False
else:
self.use_mule = True
else:
self.use_mule = False
caller = self.get_caller(caller=inspect.currentframe())
Expand Down

0 comments on commit 8e01d06

Please sign in to comment.