1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +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:
Adolfo Gómez 2012-12-19 12:09:15 +00:00
parent de680eabb3
commit c1dd63a7a7
2 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ class UserServiceRemover(Job):
@transaction.commit_on_success
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:
UserServiceManager.manager().remove(us)