示例#1
0
    def handle(self):
        Parallel(
            TaskA(),
            TaskE()
        ).execute()

        TaskC().execute()
    def handle(self):

        event = Wait(MyEvent).seconds(4).execute()

        if event:
            TaskA().execute()
        else:
            TaskB().execute()
示例#3
0
    def handle(self):

        a = TaskA().execute()

        if a > 0:
            TaskB().execute()
        else:
            TaskC().execute()

        TaskD().execute()
    def handle(self):

        # Execute taskA and taskB in parallel
        a, b = Parallel(TaskA(), TaskB()).execute()

        # Wait for the end of execution of both tasks
        if a > b:
            TaskC().execute()
        else:
            TaskD().execute()
示例#5
0
 def handle(self):
     Parallel(TaskA(), TaskB()).execute()
示例#6
0
 def handle(self):
     TaskA().dispatch()
     TaskB().dispatch()
     TaskC().execute()
     TaskD().execute()
示例#7
0
import client
from tasks.task_a import TaskA

TaskA().dispatch()
import client
from tasks.task_a import TaskA

TaskA().schedule('* * * * * *')
示例#9
0
 def handle(self):
     TaskA().execute()
     Wait().seconds(5).execute()
     TaskB().execute()
示例#10
0
 def handle(self):
     TaskA().execute()
     if self.state:
         TaskB().execute()
     else:
         TaskC().execute()