mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-25 23:21:41 +03:00
Now machines does not locks forever....
This commit is contained in:
parent
017aa46403
commit
5f30e083b1
@ -106,9 +106,10 @@ class IPMachinesService(IPServiceBase):
|
||||
# Current stored data, if it exists
|
||||
d = self.storage.readData('ips')
|
||||
old_ips = pickle.loads(d) if d and isinstance(d, bytes) else []
|
||||
# dissapeared ones
|
||||
dissapeared = set(old_ips) - set(self._ips)
|
||||
with transaction.atomic():
|
||||
for old in old_ips:
|
||||
if old not in self._ips:
|
||||
for old in dissapeared:
|
||||
self.storage.remove(old.split('~')[0])
|
||||
|
||||
self._token = self.token.value.strip()
|
||||
|
Loading…
Reference in New Issue
Block a user