DIRAC 9.0.15__py3-none-any.whl → 9.0.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -599,7 +599,7 @@ class TornadoBaseClient:
599
599
  if url not in self.__bannedUrls:
600
600
  self.__bannedUrls += [url]
601
601
  if retry < self.__nbOfUrls - 1:
602
- self._request(retry=retry + 1, outputFile=outputFile, **kwargs)
602
+ return self._request(retry=retry + 1, outputFile=outputFile, **kwargs)
603
603
 
604
604
  errStr = f"{str(e)}: {rawText}"
605
605
  return S_ERROR(errStr)
@@ -421,7 +421,7 @@ class SingularityComputingElement(ComputingElement):
421
421
  # if there's a max RAM available to the job, use that
422
422
  if self.maxRAM:
423
423
  self.ceParameters["MemoryLimitMB"] = min(
424
- self.maxRAM, self.ceParameters.get("MemoryLimitMB", 1024 * 1024)
424
+ self.maxRAM, int(self.ceParameters.get("MemoryLimitMB", 1024 * 1024))
425
425
  ) # 1024 * 1024 is an arbitrary large number
426
426
  result = CG2Manager().systemCall(
427
427
  0, cmd, callbackFunction=self.sendOutput, env=self.__getEnv(), ceParameters=self.ceParameters
@@ -354,7 +354,13 @@ class JobManagerHandlerMixin:
354
354
  validJobList, invalidJobList, nonauthJobList, ownerJobList = self.jobPolicy.evaluateJobRights(
355
355
  jobList, RIGHT_RESCHEDULE
356
356
  )
357
- res = rescheduleJobs(validJobList, source="JobManager")
357
+ res = rescheduleJobs(
358
+ validJobList,
359
+ source="JobManager",
360
+ jobDB=self.jobDB,
361
+ taskQueueDB=self.taskQueueDB,
362
+ jobLoggingDB=self.jobLoggingDB,
363
+ )
358
364
  if not res["OK"]:
359
365
  self.log.error(res["Message"])
360
366
 
@@ -242,7 +242,7 @@ def getAvailableRAM(siteName=None, gridCE=None, queue=None):
242
242
  gLogger.info("Looking in", csPath)
243
243
  availableRAM = gConfig.getValue(csPath, None)
244
244
  if availableRAM:
245
- return availableRAM
245
+ return int(availableRAM)
246
246
 
247
247
  # 3) checks if 'WholeNode' is one of the used tags
248
248
  # Tags of the CE
@@ -277,6 +277,6 @@ def getRAMForJob(jobID):
277
277
  # from /Resources/Computing/JobLimits/jobID/MaxRAM (set by PoolComputingElement)
278
278
  ram = gConfig.getValue(f"Resources/Computing/JobLimits/{jobID}/MaxRAM")
279
279
  if ram:
280
- return ram
280
+ return int(ram)
281
281
 
282
282
  return getAvailableRAM()
@@ -208,12 +208,13 @@ class PilotCStoJSONSynchronizer:
208
208
  if defaultSetup:
209
209
  pilotDict["DefaultSetup"] = defaultSetup
210
210
 
211
- self.log.debug("From DIRAC/Configuration")
212
- configurationServers = gConfig.getServersList()
213
- if not includeMasterCS:
214
- masterCS = gConfigurationData.getMasterServer()
215
- configurationServers = exclude_master_cs_aliases(configurationServers, masterCS)
216
-
211
+ configurationServers = Operations().getValue("Pilot/OverrideConfigurationServers", [])
212
+ if not configurationServers:
213
+ self.log.debug("From DIRAC/Configuration")
214
+ configurationServers = gConfig.getServersList()
215
+ if not includeMasterCS:
216
+ masterCS = gConfigurationData.getMasterServer()
217
+ configurationServers = exclude_master_cs_aliases(configurationServers, masterCS)
217
218
  pilotDict["ConfigurationServers"] = configurationServers
218
219
 
219
220
  preferredURLPatterns = gConfigurationData.extractOptionFromCFG("/DIRAC/PreferredURLPatterns")
@@ -118,12 +118,21 @@ def createJobWrapper(
118
118
  return S_OK(generatedFiles)
119
119
 
120
120
 
121
- def rescheduleJobs(jobIDs: list[int], source: str = "") -> dict:
121
+ def rescheduleJobs(
122
+ jobIDs: list[int],
123
+ source: str = "",
124
+ jobDB: JobDB | None = None,
125
+ taskQueueDB: TaskQueueDB | None = None,
126
+ jobLoggingDB: JobLoggingDB | None = None,
127
+ ) -> dict:
122
128
  """Utility to reschedule jobs (not atomic, nor bulk)
123
129
  Requires direct access to the JobDB and TaskQueueDB
124
130
 
125
131
  :param jobIDs: list of jobIDs
126
132
  :param source: source of the reschedule
133
+ :param jobDB: optional JobDB instance to reuse (creates new if not provided)
134
+ :param taskQueueDB: optional TaskQueueDB instance to reuse (creates new if not provided)
135
+ :param jobLoggingDB: optional JobLoggingDB instance to reuse (creates new if not provided)
127
136
  :return: S_OK/S_ERROR
128
137
  :rtype: dict
129
138
 
@@ -131,13 +140,21 @@ def rescheduleJobs(jobIDs: list[int], source: str = "") -> dict:
131
140
 
132
141
  failedJobs = []
133
142
 
143
+ # Reuse provided DB instances or create new ones
144
+ if jobDB is None:
145
+ jobDB = JobDB()
146
+ if taskQueueDB is None:
147
+ taskQueueDB = TaskQueueDB()
148
+ if jobLoggingDB is None:
149
+ jobLoggingDB = JobLoggingDB()
150
+
134
151
  for jobID in jobIDs:
135
- result = JobDB().rescheduleJob(jobID)
152
+ result = jobDB.rescheduleJob(jobID)
136
153
  if not result["OK"]:
137
154
  failedJobs.append(jobID)
138
155
  continue
139
- TaskQueueDB().deleteJob(jobID)
140
- JobLoggingDB().addLoggingRecord(
156
+ taskQueueDB.deleteJob(jobID)
157
+ jobLoggingDB.addLoggingRecord(
141
158
  result["JobID"],
142
159
  status=result["Status"],
143
160
  minorStatus=result["MinorStatus"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DIRAC
3
- Version: 9.0.15
3
+ Version: 9.0.16
4
4
  Summary: DIRAC is an interware, meaning a software framework for distributed computing.
5
5
  Home-page: https://github.com/DIRACGrid/DIRAC/
6
6
  License: GPL-3.0-only
@@ -19,7 +19,7 @@ Requires-Dist: cachetools
19
19
  Requires-Dist: certifi
20
20
  Requires-Dist: cwltool
21
21
  Requires-Dist: diraccfg
22
- Requires-Dist: DIRACCommon==v9.0.15
22
+ Requires-Dist: DIRACCommon==v9.0.16
23
23
  Requires-Dist: diracx-client>=v0.0.1
24
24
  Requires-Dist: diracx-core>=v0.0.1
25
25
  Requires-Dist: diracx-cli>=v0.0.1
@@ -207,7 +207,7 @@ DIRAC/Core/Tornado/__init__.py,sha256=cO7z-h1lVEu7RRPYeY3BZLJu-FZH9p7Gvuukw1ZgcM
207
207
  DIRAC/Core/Tornado/Client/ClientSelector.py,sha256=jII2UaAnoyD8ixLML1DLxGDfstmE2rVSqXbgBZJv5ak,4109
208
208
  DIRAC/Core/Tornado/Client/TornadoClient.py,sha256=o4x6orUNyqhWG4GbihlHgk_2trjz1F0Zm0xcQ0MaRlo,3869
209
209
  DIRAC/Core/Tornado/Client/__init__.py,sha256=cO7z-h1lVEu7RRPYeY3BZLJu-FZH9p7Gvuukw1ZgcME,31
210
- DIRAC/Core/Tornado/Client/private/TornadoBaseClient.py,sha256=Gp7KyenLZ3Y1-Fow8r2MM5DjkUslXLtQEPfT_Hxl6ng,27704
210
+ DIRAC/Core/Tornado/Client/private/TornadoBaseClient.py,sha256=9kbCFQInMRu6rveHEQNYYxpSnGlbo7kJtSKt4ix2k10,27711
211
211
  DIRAC/Core/Tornado/Client/private/__init__.py,sha256=cO7z-h1lVEu7RRPYeY3BZLJu-FZH9p7Gvuukw1ZgcME,31
212
212
  DIRAC/Core/Tornado/Server/HandlerManager.py,sha256=IQG2_dufNM43TGqfYU6QOTMlJyPdeCSs7TWqHlAls_Q,8181
213
213
  DIRAC/Core/Tornado/Server/TornadoREST.py,sha256=-4_gROsCYPrwHifagoZFqUSfu6mlkk4PMeL9G7NTba0,15884
@@ -910,7 +910,7 @@ DIRAC/Resources/Computing/LocalComputingElement.py,sha256=pELd0UjXTNz4LcnSZOkwG-
910
910
  DIRAC/Resources/Computing/PoolComputingElement.py,sha256=WiEKyGBmocOfEFwLbk69jsYyHe5ZQNrgWnb0KE_J91I,11976
911
911
  DIRAC/Resources/Computing/SSHBatchComputingElement.py,sha256=3ZEK6AkorZM0Ko32VKrcJ-ywTR0hkn5fBuGrJruEbA4,5953
912
912
  DIRAC/Resources/Computing/SSHComputingElement.py,sha256=bBzIkwVNQLgL3NF0wTCur_WudRLLmoGU-RknWQ6aVXs,32669
913
- DIRAC/Resources/Computing/SingularityComputingElement.py,sha256=a-XQF0tJa_yLhVd1UqpuqkjkqQ_ZjtIciUUPfIGapWI,18336
913
+ DIRAC/Resources/Computing/SingularityComputingElement.py,sha256=t3rbRJQQA4SQk15ZZb5LHs5swlxTiPsnN_cexDhPaGU,18341
914
914
  DIRAC/Resources/Computing/__init__.py,sha256=S0glZLs-Q2srpRLELQPDHSB9CVAcBXrPnQsFi-ZsokM,43
915
915
  DIRAC/Resources/Computing/cloudinit.template,sha256=gF4yOILXXWjlrs3bcazLA2Wf2n7QYkebMcaD_kNWK5I,4025
916
916
  DIRAC/Resources/Computing/BatchSystems/Condor.py,sha256=CfKZOQqBkX-L4MQfQmVcMuLDkWVe-whG1ZU-FR5Q2Jk,13699
@@ -1221,7 +1221,7 @@ DIRAC/WorkloadManagementSystem/JobWrapper/test/script-RESC.sh,sha256=kiY-Af9a1bs
1221
1221
  DIRAC/WorkloadManagementSystem/JobWrapper/test/script-fail.sh,sha256=f1R0qtgJgOI3AbEoxGBqN8ClA6Y8Bz8tHlBXrxjySDs,63
1222
1222
  DIRAC/WorkloadManagementSystem/JobWrapper/test/script-long.sh,sha256=yzaSDg7P5hGv9SSCBsl8FLuj6-udCcpd0qId9kSv4Nc,41
1223
1223
  DIRAC/WorkloadManagementSystem/JobWrapper/test/script.sh,sha256=fbYLJJTVw9K7f9NdMvW_a-NkBI6SPup4NebPFYFKsbQ,9
1224
- DIRAC/WorkloadManagementSystem/Service/JobManagerHandler.py,sha256=sUNdlsf5sI8GG3yjasSw5GO9OwVGGYIQA1a0Prl9Jd0,21828
1224
+ DIRAC/WorkloadManagementSystem/Service/JobManagerHandler.py,sha256=OIidvhvX3eIe19ni8ttaaPWF_fmQgBBel2v5j8U8YMw,21979
1225
1225
  DIRAC/WorkloadManagementSystem/Service/JobMonitoringHandler.py,sha256=sFJOme3KDLeAppH_AF5dTt8om_g_zUSQvPnIs9BAQkc,7586
1226
1226
  DIRAC/WorkloadManagementSystem/Service/JobPolicy.py,sha256=o88xR3roe_JRB5F53oxb1LIuqY2qCCw6w5njprrJFMI,8057
1227
1227
  DIRAC/WorkloadManagementSystem/Service/JobStateUpdateHandler.py,sha256=TiSnLQTNd-HgAhPoqwebzN6G95pVXXgETJ5Hbw29XnY,9226
@@ -1239,14 +1239,14 @@ DIRAC/WorkloadManagementSystem/Service/WMSAdministratorHandler.py,sha256=Hwi6RBQ
1239
1239
  DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py,sha256=VMSOEHkpOrNB_VIGESnxMYdnDjkmR4Qbnf_H7Yp0m88,4528
1240
1240
  DIRAC/WorkloadManagementSystem/Service/__init__.py,sha256=IRaXIxMoS1SbRehm7ONo87SD1l44VBmowjbfkChvdsc,58
1241
1241
  DIRAC/WorkloadManagementSystem/Utilities/JobModel.py,sha256=jN9sFbzMZo9tab6Kp7OeBCMCrfx21gCqRbm1XjLxong,1781
1242
- DIRAC/WorkloadManagementSystem/Utilities/JobParameters.py,sha256=WftHMrIZ1t78C2HPoOQp-TkjeZ96giSy_A5TPkMaT6Y,11629
1242
+ DIRAC/WorkloadManagementSystem/Utilities/JobParameters.py,sha256=eUvSzAyGLcIG2l9q_Mp8q-14N05PXRMop48zjMxYjAI,11639
1243
1243
  DIRAC/WorkloadManagementSystem/Utilities/JobStatusUtility.py,sha256=WtGJzC7fHvydANh8JH6e1Kk_jebrCMPr2c5cw3ufjm8,7826
1244
1244
  DIRAC/WorkloadManagementSystem/Utilities/ParametricJob.py,sha256=FNUsGhvsFVrtmA7r8G-sd4QTMeBkqG1sdtwiBUKQyd0,605
1245
- DIRAC/WorkloadManagementSystem/Utilities/PilotCStoJSONSynchronizer.py,sha256=ZQk2tD40986awO9pae1zmdPEWlnMJt4m61Z_RU3LWl8,12476
1245
+ DIRAC/WorkloadManagementSystem/Utilities/PilotCStoJSONSynchronizer.py,sha256=8pI4-FMwBFrrdFJ5izJm__UGR7Gt9dPsRQRwuofXbEQ,12627
1246
1246
  DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py,sha256=VcvQTpeyTbVYqSsPQDyAt37N2CaEAnIuvbR6yk4kYk8,15465
1247
1247
  DIRAC/WorkloadManagementSystem/Utilities/QueueUtilities.py,sha256=HSa2EGSa03dxD6DFk6UDe87Yz0qOz0vMfyUYb2x_-Kg,12076
1248
1248
  DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py,sha256=wSHit3b-Z6vuOIXH1U_mS24FBYR3zXw4Q5Utk1MWjnA,12159
1249
- DIRAC/WorkloadManagementSystem/Utilities/Utils.py,sha256=A6M-GnyC5LXeO0pJxwzqNdLjZLMC3WZ1o7dVFXumrsU,5331
1249
+ DIRAC/WorkloadManagementSystem/Utilities/Utils.py,sha256=jAMlmxYEhduaMyMx9mUhjg8yOo_nw7ANCJ9o1E3DVPw,5958
1250
1250
  DIRAC/WorkloadManagementSystem/Utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1251
1251
  DIRAC/WorkloadManagementSystem/Utilities/jobAdministration.py,sha256=uLgB0QLFPKUlZoWCOJYtQHaKykgCpodalHnMWpGld4s,548
1252
1252
  DIRAC/WorkloadManagementSystem/Utilities/test/Test_JobModel.py,sha256=coRtGksgrKIdodk7QFn-AjODBJBLfiH0Sf7I2F0rpbI,8040
@@ -1296,9 +1296,9 @@ DIRAC/tests/Workflow/Integration/exe-script.py,sha256=B_slYdTocEzqfQLRhwuPiLyYUn
1296
1296
  DIRAC/tests/Workflow/Integration/helloWorld.py,sha256=tBgEHH3ZF7ZiTS57gtmm3DW-Qxgm_57HWHpM-Y8XSws,205
1297
1297
  DIRAC/tests/Workflow/Regression/helloWorld.py,sha256=69eCgFuVSYo-mK3Dj2dw1c6g86sF5FksKCf8V2aGVoM,509
1298
1298
  DIRAC/tests/Workflow/Regression/helloWorld.xml,sha256=xwydIcFTAHIX-YPfQfyxuQ7hzvIO3IhR3UAF7ORgkGg,5310
1299
- dirac-9.0.15.dist-info/licenses/LICENSE,sha256=uyr4oV6jmjUeepXZPPjkJRwa5q5MrI7jqJz5sVXNblQ,32452
1300
- dirac-9.0.15.dist-info/METADATA,sha256=uLMgTz4woTQZXHcH7OnLP_AjPb5N0mHqR0x_H2JmTKY,10039
1301
- dirac-9.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1302
- dirac-9.0.15.dist-info/entry_points.txt,sha256=hupzIL8aVmjK3nn7RLKdhcaiPmLOiD3Kulh3CSDHKmw,16492
1303
- dirac-9.0.15.dist-info/top_level.txt,sha256=RISrnN9kb_mPqmVu8_o4jF-DSX8-h6AcgfkO9cgfkHA,6
1304
- dirac-9.0.15.dist-info/RECORD,,
1299
+ dirac-9.0.16.dist-info/licenses/LICENSE,sha256=uyr4oV6jmjUeepXZPPjkJRwa5q5MrI7jqJz5sVXNblQ,32452
1300
+ dirac-9.0.16.dist-info/METADATA,sha256=Z62NtRQYwvXnj2wongUVv3A5m50jd9Ty9bDCI9cmIPU,10039
1301
+ dirac-9.0.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1302
+ dirac-9.0.16.dist-info/entry_points.txt,sha256=hupzIL8aVmjK3nn7RLKdhcaiPmLOiD3Kulh3CSDHKmw,16492
1303
+ dirac-9.0.16.dist-info/top_level.txt,sha256=RISrnN9kb_mPqmVu8_o4jF-DSX8-h6AcgfkO9cgfkHA,6
1304
+ dirac-9.0.16.dist-info/RECORD,,
File without changes