def main(): parser = getBasicOptionParser() parser.add_argument( "jobStore", type=str, help=("Store in which to place job management files \ and the global accessed temporary files" "(If this is a file path this needs to be globally accessible " "by all machines running jobs).\n" "If the store already exists and restart is false an" " ExistingJobStoreException exception will be thrown.")) parser.add_argument("--version", action='version', version=version) options = parseBasicOptions(parser) jobStore = loadJobStore(options.jobStore) logger.info( "Starting routine to kill running jobs in the toil workflow: %s" % options.jobStore) ####This behaviour is now broken batchSystem = loadBatchSystem( jobStore.config ) #This should automatically kill the existing jobs.. so we're good. for jobID in batchSystem.getIssuedBatchJobIDs( ): #Just in case we do it again. batchSystem.killBatchJobs(jobID) logger.info("All jobs SHOULD have been killed")
def main(): parser = getBasicOptionParser("usage: %prog [--jobStore] JOB_TREE_DIR [more options]", "%prog 0.1") parser.add_option("--jobStore", dest="jobStore", help="Job store path. Can also be specified as the single argument to the script.") options, args = parseBasicOptions(parser) if len(sys.argv) == 1: parser.print_help() sys.exit(0) assert len(args) <= 1 #Only toil may be specified as argument if len(args) == 1: #Allow toil directory as arg options.jobStore = args[0] logger.info("Parsed arguments") if options.jobStore == None: parser.error("Specify --jobStore") jobStore = loadJobStore(options.jobStore) logger.info("Starting routine to kill running jobs in the toil workflow: %s" % options.jobStore) ####This behaviour is now broken batchSystem = loadBatchSystem(jobStore.config) #This should automatically kill the existing jobs.. so we're good. for jobID in batchSystem.getIssuedBatchJobIDs(): #Just in case we do it again. batchSystem.killBatchJobs(jobID) logger.info("All jobs SHOULD have been killed")
def main(): parser = getBasicOptionParser() parser.add_argument("jobStore", type=str, help=("Store in which to place job management files \ and the global accessed temporary files" "(If this is a file path this needs to be globally accessible " "by all machines running jobs).\n" "If the store already exists and restart is false an" " ExistingJobStoreException exception will be thrown.")) parser.add_argument("--version", action='version', version=version) options = parseBasicOptions(parser) jobStore = loadJobStore(options.jobStore) logger.info("Starting routine to kill running jobs in the toil workflow: %s" % options.jobStore) ####This behaviour is now broken batchSystem = loadBatchSystem(jobStore.config) #This should automatically kill the existing jobs.. so we're good. for jobID in batchSystem.getIssuedBatchJobIDs(): #Just in case we do it again. batchSystem.killBatchJobs(jobID) logger.info("All jobs SHOULD have been killed")