Commit b267e79e authored by payno's avatar payno
Browse files

[core][process] add _callbacks list

parent 693939de
......@@ -50,6 +50,7 @@ class Process(object):
"""flag to notice when a end of process is required"""
self._settings = {}
# configuration
self._callbacks = []
@property
def name(self):
......@@ -58,6 +59,19 @@ class Process(object):
def stop(self):
self.__stop = True
@property
def advancement(self):
return self._advancement
@advancement.setter
def advancement(self, advancement):
assert isinstance(advancement, Progress)
self._advancement = advancement
@property
def callbacks(self):
return self._callbacks
@staticmethod
def getXasObject(xas_obj):
if isinstance(xas_obj, dict):
......@@ -147,3 +161,6 @@ class Process(object):
else:
raise ValueError()
xas_obj.register_processing(process=self, data=_data)
def addCallback(self, callback):
self._callbacks.append(callback)
\ No newline at end of file
Supports Markdown
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