def __init__(self, coroutines, _item, start_time, end_time): """ desc: Constructor. arguments: item: desc: An item object. type: item """ if not hasattr(_item, u'coroutine'): raise osexception(u'%s not supported by coroutines' % _item.item_type) self._item = _item base_task.__init__(self, coroutines, start_time, end_time) self.coroutines.event(u'initialize %s' % _item.coroutine)
def __init__(self, function_name, python_workspace, start_time, end_time): """ desc: Constructor. arguments: function_name: desc: The name of a Python generator function. type: str python_workspace: desc: The python-workspace object. type: python_workspace """ self.function_name = function_name self.python_workspace = python_workspace base_task.__init__(self, start_time, end_time)
def __init__(self, coroutines, _item, start_time, end_time): """ desc: Constructor. arguments: item: desc: An item object. type: item """ if not hasattr(_item, u'coroutine'): raise osexception( u'%s not supported by coroutines' % _item.item_type) self._item = _item base_task.__init__(self, coroutines, start_time, end_time) self.coroutines.event(u'initialize %s' % _item.coroutine)
def __init__(self, coroutines, function_name, python_workspace, start_time, end_time): """ desc: Constructor. arguments: function_name: desc: The name of a Python generator function. type: str python_workspace: desc: The python-workspace object. type: python_workspace """ base_task.__init__(self, coroutines, start_time, end_time) self.function_name = function_name self.python_workspace = python_workspace
def __init__(self, _item, start_time, end_time): """ desc: Constructor. arguments: item: desc: An item object. type: item """ if not hasattr(_item, u'coroutine'): print(u'inject coroutine into %s' % _item) try: _item.__class__.coroutine = getattr(injections, _item.item_type) except: raise osexception(u'%s not supported by coroutines' % _item.item_type) print(u'coroutine: %s' % _item.coroutine) self._item = _item base_task.__init__(self, start_time, end_time)