File indexing completed on 2026-04-10 08:39:07
0001 import sys
0002 import time
0003 import uuid
0004
0005 from pandaserver.taskbuffer.FileSpec import FileSpec
0006 from pandaserver.taskbuffer.JobSpec import JobSpec
0007 from pandaserver.userinterface import Client
0008
0009
0010 site = "ANALY_BNL-LSST"
0011
0012
0013
0014
0015
0016 datasetName = f"panda.user.jschovan.lsst.{str(uuid.uuid4())}"
0017 destName = None
0018
0019 job = JobSpec()
0020 job.jobDefinitionID = int(time.time()) % 10000
0021 job.jobName = f"{str(uuid.uuid4())}"
0022
0023
0024 job.transformation = "http://pandawms.org/pandawms-jobcache/lsst-trf-phosim332.sh"
0025 job.destinationDBlock = datasetName
0026
0027 job.destinationSE = "local"
0028 job.currentPriority = 1000
0029
0030
0031
0032
0033
0034
0035
0036 job.prodSourceLabel = "panda"
0037 job.computingSite = site
0038 job.jobParameters = ""
0039 job.VO = "lsst"
0040
0041 fileOL = FileSpec()
0042 fileOL.lfn = f"{job.jobName}.job.log.tgz"
0043 fileOL.destinationDBlock = job.destinationDBlock
0044 fileOL.destinationSE = job.destinationSE
0045 fileOL.dataset = job.destinationDBlock
0046 fileOL.type = "log"
0047 job.addFile(fileOL)
0048
0049
0050 s, o = Client.submit_jobs([job])
0051 print(s)
0052 for x in o:
0053 print(f"PandaID={x[0]}")