for line in open(files_file).readlines(): line = line.strip() if line: if isfile(line): files_to_upload.append(line) else: print 'Not a file: ' + line sys.exit(1) return files_to_upload files_to_upload = read_files(files_file) if not si: LoginManager.initEnvironment() si = LoginManager.login('bestgrid', True) filemanager = GrisuRegistryManager.getDefault(si).getFileManager() job = JobObject(si) job.setSubmissionLocation('pan:pan.nesi.org.nz') job.setTimestampJobname(jobname_template) job.setCommandline(commandline) # add input files for file in files_to_upload: job.addInputFileUrl(file) jobname = job.createJob('/nz/nesi') print 'Submitting job...' job.submitJob()
files_to_upload = [] for line in open(files_file).readlines(): line = line.strip() if line: if isfile(line): files_to_upload.append(line) else: print 'Not a file: '+line sys.exit(1) return files_to_upload files_to_upload = read_files(files_file) if not si: LoginManager.initEnvironment() si = LoginManager.login('bestgrid', True) filemanager = GrisuRegistryManager.getDefault(si).getFileManager() job = JobObject(si) job.setSubmissionLocation('pan:pan.nesi.org.nz') job.setTimestampJobname(jobname_template) job.setCommandline(commandline) # add input files for file in files_to_upload: job.addInputFileUrl(file) jobname = job.createJob('/nz/nesi') print 'Submitting job...'
''' Created on 11/12/2009 @author: markus ''' from grisu.frontend.control.login import LoginManager from grisu.model import GrisuRegistryManager import sys si = LoginManager.login() resource = GrisuRegistryManager.getDefault(si) subLocs = resource.getResourceInformation().getAllSubmissionLocations() for subLoc in subLocs: print subLoc # don't forget to exit properly. this cleans up possible existing threads/executors sys.exit()
https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/javadoc/org/vpac/grisu/frontend/model/job/JobObject.html @author: Markus Binsteiner ''' from grisu.jcommons.constants import Constants from grisu.control.exceptions import NoSuchJobException from grisu.frontend.control.login import LoginManager, LoginParams from grisu.frontend.model.job import JobObject, BatchJobObject, \ JobsException import sys import time # login stuff this uses a local proxy, if there is none, an exception is thrown loginParams = LoginParams("Local", None, None); si = LoginManager.login(None, None, None, None, loginParams) # how many jobs do we want numberOfJobs = 10 # the (unique) name of the multijob multiJobName = "10catJobs"; # delete an (possibly existing) old job with the same name try: si.kill(multiJobName, True); except NoSuchJobException: print "No need to kill and clean job" + multiJobName status = si.getActionStatus(multiJobName) while not status.isFinished():
https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/javadoc/org/vpac/grisu/frontend/model/job/JobObject.html @author: Markus Binsteiner ''' from grisu.jcommons.constants import Constants from grisu.control.exceptions import NoSuchJobException from grisu.frontend.control.login import LoginManager, LoginParams from grisu.frontend.model.job import JobObject, BatchJobObject, \ JobsException import sys import time # login stuff this uses a local proxy, if there is none, an exception is thrown loginParams = LoginParams("Local", None, None) si = LoginManager.login(None, None, None, None, loginParams) # how many jobs do we want numberOfJobs = 10 # the (unique) name of the multijob multiJobName = "10catJobs" # delete an (possibly existing) old job with the same name try: si.kill(multiJobName, True) except NoSuchJobException: print "No need to kill and clean job" + multiJobName status = si.getActionStatus(multiJobName) while not status.isFinished():
""" Created on 11/12/2009 @author: markus """ from grisu.frontend.control.login import LoginManager from grisu.model import GrisuRegistryManager import sys si = LoginManager.login() resource = GrisuRegistryManager.getDefault(si) subLocs = resource.getResourceInformation().getAllSubmissionLocations() for subLoc in subLocs: print subLoc # don't forget to exit properly. this cleans up possible existing threads/executors sys.exit()