Commit 5544b59b authored by Loic Esteve's avatar Loic Esteve Committed by Hardik Juneja

Move class definitions inside ENABLE_JOBLIB block

parent bd51d473
......@@ -43,7 +43,8 @@ except ImportError:
LOG("CMFActivityBackend", WARNING, "CLASS NOT LOADED!!!")
ENABLE_JOBLIB = False
class MySafeFunction(SafeFunction):
if ENABLE_JOBLIB:
class MySafeFunction(SafeFunction):
"""Wrapper around a SafeFunction that catches any exception
The exception can be handled in CMFActivityResult.get
......@@ -54,7 +55,7 @@ class MySafeFunction(SafeFunction):
except Exception as exc:
return exc
class CMFActivityResult(object):
class CMFActivityResult(object):
def __init__(self, active_process, callback):
self.active_process = active_process
self.callback = callback
......@@ -74,7 +75,6 @@ class CMFActivityResult(object):
self.callback(result)
return result
if ENABLE_JOBLIB:
class CMFActivityBackend(ParallelBackendBase):
def __init__(self, *args, **kwargs):
self.zope_context = kwargs['zope_context']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment