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(
|
||||
length=6,
|
||||
label=_('Skip time'),
|
||||
defvalue='15',
|
||||
defvalue='0',
|
||||
order=2,
|
||||
tooltip=_('If a host fails to check, skip it for this time (in minutes).'),
|
||||
minValue=0,
|
||||
@ -225,11 +225,12 @@ class IPMachinesService(IPServiceBase):
|
||||
self._skipTimeOnFailure,
|
||||
)
|
||||
self.storage.remove(theIP) # Return Machine to pool
|
||||
self.cache.put(
|
||||
'port{}'.format(theIP),
|
||||
'1',
|
||||
validity=self._skipTimeOnFailure * 60,
|
||||
)
|
||||
if self._skipTimeOnFailure > 0:
|
||||
self.cache.put(
|
||||
'port{}'.format(theIP),
|
||||
'1',
|
||||
validity=self._skipTimeOnFailure * 60,
|
||||
)
|
||||
continue
|
||||
if theMAC:
|
||||
return theIP + ';' + theMAC
|
||||
|
Loading…
Reference in New Issue
Block a user