File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
WorkloadManagementSystem/Agent Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def __init__(self, baseAgentName):
61
61
self .__loader = ModuleLoader ("Agent" , PathFinder .getAgentSection , AgentModule )
62
62
self .__tasks = {}
63
63
self .__baseAgentName = baseAgentName
64
- self .__scheduler = ThreadScheduler .ThreadScheduler (enableReactorThread = False , minPeriod = 30 )
64
+ self .__scheduler = ThreadScheduler .ThreadScheduler (enableReactorThread = False , minPeriod = 10 )
65
65
self .__alive = True
66
66
self .__running = False
67
67
Original file line number Diff line number Diff line change @@ -177,14 +177,17 @@ def execute(self):
177
177
178
178
self .stopAfterFailedMatches = self .am_getOption ("StopAfterFailedMatches" , self .stopAfterFailedMatches )
179
179
if not jobRequest ["OK" ]:
180
- # if we don't match a job, independently from the reason,
181
- # we wait a bit longer before trying again
182
- self .am_setOption ("PollingTime" , int (self .am_getOption ("PollingTime" ) * 1.5 ))
183
180
res = self ._checkMatchingIssues (jobRequest )
184
181
if not res ["OK" ]:
185
182
self ._finish (res ["Message" ])
183
+ return res
184
+
185
+ # if we don't match a job, independently from the reason,
186
+ # we wait a bit longer before trying again
187
+ time .sleep (int (self .am_getOption ("PollingTime" )) * (self .matchFailedCount + 1 ) * 2 )
186
188
return res
187
189
190
+ # If we are, we matched a job
188
191
# Reset the Counter
189
192
self .matchFailedCount = 0
190
193
You can’t perform that action at this time.
0 commit comments