mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-23 17:34:17 +03:00
Merge remote-tracking branch 'origin/v2.1'
This commit is contained in:
commit
f2523fa8f2
@ -55,7 +55,7 @@ class HangedCleaner(Job):
|
||||
def run(self):
|
||||
since_state = getSqlDatetime() - timedelta(seconds=GlobalConfig.MAX_INITIALIZING_TIME.getInt())
|
||||
# Filter for locating machine not ready
|
||||
flt = Q(state_date__lt=since_state, state=State.PREPARING) | Q(state_date__lt=since_state, state=State.USABLE, os_state=State.PREPARING)
|
||||
flt = Q(state_date__lt=since_state, state=State.PREPARING) | Q(state_date__lt=since_state, state=State.USABLE, os_state=State.PREPARING) | Q(state_date__lt=since_state, state=State.REMOVING)
|
||||
|
||||
for ds in DeployedService.objects.exclude(osmanager=None, state__in=State.VALID_STATES, service__provider__maintenance_mode=True):
|
||||
logger.debug('Searching for hanged services for {0}'.format(ds))
|
||||
@ -63,4 +63,7 @@ class HangedCleaner(Job):
|
||||
logger.debug('Found hanged service {0}'.format(us))
|
||||
log.doLog(us, log.ERROR, 'User Service seems to be hanged. Removing it.', log.INTERNAL)
|
||||
log.doLog(ds, log.ERROR, 'Removing user service {0} because it seems to be hanged'.format(us.friendly_name))
|
||||
us.removeOrCancel()
|
||||
if us.state in (State.REMOVING,):
|
||||
us.setState(State.ERROR)
|
||||
else:
|
||||
us.removeOrCancel()
|
||||
|
@ -60,6 +60,7 @@ def guacamole(request, tunnelId):
|
||||
|
||||
response = dict2resp(val)
|
||||
except Exception:
|
||||
logger.error('Invalid guacamole ticket (F5 on client?): {}'.format(tunnelId))
|
||||
return HttpResponse(ERROR, content_type=CONTENT_TYPE)
|
||||
|
||||
return HttpResponse(response, content_type=CONTENT_TYPE)
|
||||
|
Loading…
Reference in New Issue
Block a user