3 from __future__
import print_function
12 Destination = sys.argv[2]
14 samweb = samweb_client.SAMWebClient(experiment=
'lbne')
16 def testProject(defname="project", appFamily="demo", appName="demo", appVersion="demo"):
18 projectname = samweb.makeProjectName(defname)
19 projectinfo = samweb.startProject(projectname, defname)
20 projecturl = projectinfo[
"projectURL"]
21 print (
"Project name is %s" % projectinfo[
"project"])
22 print (
"Project URL is %s" % projecturl)
24 deliveryLocation =
None 25 cpid = samweb.startProcess(projecturl, appFamily, appName, appVersion, deliveryLocation)
26 print (
"Consumer process id %s" % cpid)
27 processurl = samweb.makeProcessUrl(projecturl, cpid)
28 print (
"Process URL is %s" % processurl)
32 newfile = samweb.getNextFile(processurl)[
'url']
33 print (
"Got file %s" % newfile)
34 print (
"Attempting globus-url-copy to scratch...")
35 stat = os.system(
'globus-url-copy %s %s' % (newfile,Destination))
36 except samweb_client.NoMoreFiles:
37 print (
"No more files available")
40 samweb.releaseFile(processurl, newfile)
41 print (
"Released file %s" % newfile)
43 samweb.stopProject(projecturl)
44 print samweb.projectSummaryText(projecturl)
45 print (
"Project ended")
47 if __name__ ==
'__main__':
def testProject(defname="project", appFamily="demo", appName="demo", appVersion="demo")