diff --git a/src/cnaas_nms/scheduler/scheduler.py b/src/cnaas_nms/scheduler/scheduler.py index e20b8933..f0aef367 100644 --- a/src/cnaas_nms/scheduler/scheduler.py +++ b/src/cnaas_nms/scheduler/scheduler.py @@ -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())