mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
added log in case of max services reached on service pool
This commit is contained in:
parent
8384a43699
commit
ee9a062201
@ -51,7 +51,7 @@ import requests
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
__updated__ = '2018-09-13'
|
__updated__ = '2018-09-24'
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
traceLogger = logging.getLogger('traceLog')
|
traceLogger = logging.getLogger('traceLog')
|
||||||
@ -315,6 +315,7 @@ class UserServiceManager(object):
|
|||||||
inAssigned = ds.assignedUserServices().filter(UserServiceManager.getStateFilter()).count()
|
inAssigned = ds.assignedUserServices().filter(UserServiceManager.getStateFilter()).count()
|
||||||
# totalL1Assigned = inCacheL1 + inAssigned
|
# totalL1Assigned = inCacheL1 + inAssigned
|
||||||
if inAssigned >= ds.max_srvs: # cacheUpdater will drop necesary L1 machines, so it's not neccesary to check against inCacheL1
|
if inAssigned >= ds.max_srvs: # cacheUpdater will drop necesary L1 machines, so it's not neccesary to check against inCacheL1
|
||||||
|
log.doLog(ds, log.WARN, 'Max number of services reached: {}'.format(ds.max_srvs), log.INTERNAL)
|
||||||
raise MaxServicesReachedError()
|
raise MaxServicesReachedError()
|
||||||
# Can create new service, create it
|
# Can create new service, create it
|
||||||
events.addEvent(ds, events.ET_CACHE_MISS, fld1=0)
|
events.addEvent(ds, events.ET_CACHE_MISS, fld1=0)
|
||||||
|
Loading…
Reference in New Issue
Block a user