|
7 | 7 | In case you want to further extend it you are required to follow the note on the |
8 | 8 | initialize method and on the _getClients method. |
9 | 9 | """ |
10 | | -import time |
11 | | -import datetime |
12 | 10 | import concurrent.futures |
| 11 | +import datetime |
| 12 | +import time |
13 | 13 |
|
14 | | -from DIRAC import S_OK |
15 | | - |
| 14 | +from DIRAC import S_OK, gConfig |
| 15 | +from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations |
16 | 16 | from DIRAC.Core.Base.AgentModule import AgentModule |
17 | 17 | from DIRAC.Core.Security.ProxyInfo import getProxyInfo |
18 | | -from DIRAC.Core.Utilities.List import breakListIntoChunks |
19 | 18 | from DIRAC.Core.Utilities.Dictionaries import breakDictionaryIntoChunks |
20 | | -from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations |
| 19 | +from DIRAC.Core.Utilities.List import breakListIntoChunks |
| 20 | +from DIRAC.TransformationSystem.Agent.TransformationAgentsUtilities import TransformationAgentsUtilities |
21 | 21 | from DIRAC.TransformationSystem.Client.FileReport import FileReport |
22 | | -from DIRAC.TransformationSystem.Client.WorkflowTasks import WorkflowTasks |
23 | 22 | from DIRAC.TransformationSystem.Client.TransformationClient import TransformationClient |
24 | | -from DIRAC.TransformationSystem.Agent.TransformationAgentsUtilities import TransformationAgentsUtilities |
| 23 | +from DIRAC.TransformationSystem.Client.WorkflowTasks import WorkflowTasks |
25 | 24 | from DIRAC.WorkloadManagementSystem.Client import JobStatus |
26 | 25 | from DIRAC.WorkloadManagementSystem.Client.JobManagerClient import JobManagerClient |
27 | 26 |
|
@@ -193,11 +192,9 @@ def execute(self): |
193 | 192 | else: |
194 | 193 | # Get the transformations which should be submitted |
195 | 194 | self.tasksPerLoop = self.am_getOption("TasksPerLoop", self.tasksPerLoop) |
196 | | - res = self.jobManagerClient.getMaxParametricJobs() |
197 | | - if not res["OK"]: |
198 | | - self.log.warn("Could not get the maxParametricJobs from JobManager", res["Message"]) |
199 | | - else: |
200 | | - self.maxParametricJobs = res["Value"] |
| 195 | + self.maxParametricJobs = gConfig.getValue( |
| 196 | + "/Systems/WorkloadManagement/Services/JobManager/MaxParametricJobs", self.maxParametricJobs |
| 197 | + ) |
201 | 198 |
|
202 | 199 | self._addOperationForTransformations( |
203 | 200 | self.operationsOnTransformationDict, |
|
0 commit comments