Exemplo n.º 1
0
 def link(self, task, slot, *args, **kwargs):
     '''Add an on_complete message with the given args'''
     msg = Message.n(task, slot, *args, **kwargs)
     self._state.m.set(dict(on_complete=msg._id))
     return msg
Exemplo n.º 2
0
 def start(self, *args, **kwargs):
     '''Send a 'run' message & update state'''
     self._state.m.set(dict(status='active'))
     msg = Message.new(self, 'run', args, kwargs)
     msg.send()
     return msg
Exemplo n.º 3
0
 def schedule(self, after, *args, **kwargs):
     '''Send a 'run' message & update state'''
     self._state.m.set(dict(status='pending'))
     msg = Message.new(self, 'run', args, kwargs, after=after)
     msg.send()
     return msg
Exemplo n.º 4
0
 def schedule(self, after, *args, **kwargs):
     '''Send a 'run' message & update state'''
     self._state.m.set(dict(status='pending'))
     msg = Message.new(self, 'run', args, kwargs, after=after)
     msg.send()
     return msg
Exemplo n.º 5
0
 def start(self, *args, **kwargs):
     '''Send a 'run' message & update state'''
     self._state.m.set(dict(status='active'))
     msg = Message.new(self, 'run', args, kwargs, send=True)
     return msg
Exemplo n.º 6
0
 def link(self, task, slot, *args, **kwargs):
     '''Add an on_complete message with the given args'''
     msg = Message.n(task, slot, *args, **kwargs)
     self._state.m.set(dict(on_complete=msg._id))
     return msg
Exemplo n.º 7
0
 def schedule(self, after, *args, **kwargs):
     """Send a 'run' message & update state"""
     self._state.m.set(dict(status="pending"))
     msg = Message.new(self, "run", args, kwargs, after=after)
     msg.send()
     return msg
Exemplo n.º 8
0
 def start(self, *args, **kwargs):
     """Send a 'run' message & update state"""
     self._state.m.set(dict(status="active"))
     msg = Message.new(self, "run", args, kwargs)
     msg.send()
     return msg