forked from shaba/openuds
merged chango of timeouts on 3.0
This commit is contained in:
parent
f602d641a0
commit
8ab1342775
2
actor/.env
Normal file
2
actor/.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
PYTHONPATH=./src:${PYTHONPATH}
|
||||||
|
|
@ -87,7 +87,7 @@ class IPMachinesService(IPServiceBase):
|
|||||||
skipTimeOnFailure = gui.NumericField(
|
skipTimeOnFailure = gui.NumericField(
|
||||||
length=6,
|
length=6,
|
||||||
label=_('Skip time'),
|
label=_('Skip time'),
|
||||||
defvalue='15',
|
defvalue='0',
|
||||||
order=2,
|
order=2,
|
||||||
tooltip=_('If a host fails to check, skip it for this time (in minutes).'),
|
tooltip=_('If a host fails to check, skip it for this time (in minutes).'),
|
||||||
minValue=0,
|
minValue=0,
|
||||||
@ -225,11 +225,12 @@ class IPMachinesService(IPServiceBase):
|
|||||||
self._skipTimeOnFailure,
|
self._skipTimeOnFailure,
|
||||||
)
|
)
|
||||||
self.storage.remove(theIP) # Return Machine to pool
|
self.storage.remove(theIP) # Return Machine to pool
|
||||||
self.cache.put(
|
if self._skipTimeOnFailure > 0:
|
||||||
'port{}'.format(theIP),
|
self.cache.put(
|
||||||
'1',
|
'port{}'.format(theIP),
|
||||||
validity=self._skipTimeOnFailure * 60,
|
'1',
|
||||||
)
|
validity=self._skipTimeOnFailure * 60,
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
if theMAC:
|
if theMAC:
|
||||||
return theIP + ';' + theMAC
|
return theIP + ';' + theMAC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user