How to use the pyflow.demo.launchTasksUntil.launchTasksUntil.LaunchUntilWorkflow function in pyflow

To help you get started, we’ve selected a few pyflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Illumina / pyflow / pyflow / demo / launchTasksUntil / launchTasksUntil.py View on Github external
updateCompletedTasks()
            runningTaskCount = len(allTasks)-len(completedTasks)
            self.flowLog("Completed/Running tasks: %i %i" % (len(completedTasks), runningTaskCount))
            assert(runningTaskCount >= 0)

            # launch new tasks until it is clear the total threshold will be met
            if completedWork < self.totalContinuousWorkTarget :
                numberOfTasksToLaunch = max(maxTaskCount-runningTaskCount,0)
                for _ in range(numberOfTasksToLaunch) : launchNextTask()

            time.sleep(5)



wflow = LaunchUntilWorkflow()

# Run the worklow:
#
retval=wflow.run(mode="local",nCores=8)

sys.exit(retval)