Ejemplo n.º 1
0
 def makeWorkflow():
     job = Job()
     r1 = job.addService(ToySerializableService("woot1"))
     r2 = job.addService(ToySerializableService("woot2"))
     r3 = job.addService(ToySerializableService("woot3"))
     job.addChildFn(fnTest, [r1, r2, r3], outFile)
     return job
Ejemplo n.º 2
0
 def makeWorkflow():
     job = Job()
     r1 = job.addService(TestServiceSerialization("woot1"))
     r2 = job.addService(TestServiceSerialization("woot2"))
     r3 = job.addService(TestServiceSerialization("woot3"))
     job.addChildFn(fnTest, [ r1, r2, r3 ], outFile)
     return job
Ejemplo n.º 3
0
    def check(self):
        # A function that if it returns False causes the service to quit
        # If it raises an exception the service is killed and an error is reported
        return True

    def stop(self, fileStore):
        # Cleanup the database here
        pass


j = Job()
s = DemoService()
loginCredentialsPromise = j.addService(s)


def dbFn(loginCredentials):
    # Use the login credentials returned from the service's start method to connect to the service
    pass


j.addChildFn(dbFn, loginCredentialsPromise)

if __name__ == "__main__":
    options = Job.Runner.getDefaultOptions("./toilWorkflowRun")
    options.logLevel = "INFO"
    options.clean = "always"

    with Toil(options) as toil:
        toil.start(j)