7
# Creating a UserConfig object with the user's proxy
8
# and the path of the trusted CA certificates
10
uc.ProxyPath("/tmp/x509up_u%s" % os.getuid())
11
uc.CACertificatesDirectory("/etc/grid-security/certificates")
13
# Create a new job object with a given JobID
15
job.JobID = "https://piff.hep.lu.se:443/arex/1QuMDmRwvUfn5h5iWqkutBwoABFKDmABFKDmIpHKDmXBFKDmIuAean"
17
job.JobManagementURL = arc.URL("https://piff.hep.lu.se:443/arex")
18
job.JobStatusURL = arc.URL("https://piff.hep.lu.se:443/arex")
20
print "Job object before update:"
21
job.SaveToStream(arc.CPyOstream(sys.stdout), True)
23
job_supervisor = arc.JobSupervisor(uc, [job])
25
# Update the states of jobs within this JobSupervisor
26
job_supervisor.Update()
28
# Get our updated job from the JobSupervisor
29
jobs = job_supervisor.GetAllJobs()
32
print "Job object after update:"
33
job.SaveToStream(arc.CPyOstream(sys.stdout), True)
35
# wait for all the background threads to finish before we destroy the objects they may use
39
arc.ThreadInitializer().waitExit()
41
# arc.Logger.getRootLogger().addDestination(arc.LogStream(sys.stderr))
42
# arc.Logger.getRootLogger().setThreshold(arc.DEBUG)