mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
* Updated nxtransport to match new actor
* Updated UserServiceCleaner to wait a bit before trying to remove "removable" services (so we avoid most connections errors)
This commit is contained in:
parent
de680eabb3
commit
c1dd63a7a7
@ -69,6 +69,7 @@ class UserServiceRemover(Job):
|
|||||||
|
|
||||||
@transaction.commit_on_success
|
@transaction.commit_on_success
|
||||||
def run(self):
|
def run(self):
|
||||||
removables = UserService.objects.filter(state=State.REMOVABLE)[0:UserServiceRemover.removeAtOnce]
|
removeFrom = getSqlDatetime() - timedelta(seconds=10) # We keep at least 30 seconds the machine before removing it, so we avoid connections errors
|
||||||
|
removables = UserService.objects.filter(state=State.REMOVABLE, state_date__lt=removeFrom)[0:UserServiceRemover.removeAtOnce]
|
||||||
for us in removables:
|
for us in removables:
|
||||||
UserServiceManager.manager().remove(us)
|
UserServiceManager.manager().remove(us)
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user