Exemple #1
0
'''
Created on 11/12/2009

@author: markus
'''
from org.vpac.grisu.frontend.control.login import LoginManager
from org.vpac.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()
Exemple #2
0
https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/javadoc/org/vpac/grisu/frontend/model/job/JobObject.html

@author: Markus Binsteiner
'''

from au.org.arcs.jcommons.constants import Constants
from org.vpac.grisu.control.exceptions import NoSuchJobException
from org.vpac.grisu.frontend.control.login import LoginManager, LoginParams
from org.vpac.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():