1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Fixed cache updater, so now we can select "0 elements" for cache,

initials, etc..
This commit is contained in:
Adolfo Gómez García 2015-01-31 10:18:12 +01:00
parent b8a1fc31f3
commit e3e652d4e1

View File

@ -76,8 +76,8 @@ class ServiceCacheUpdater(Job):
# First we get all deployed services that could need cache generation
DeployedService.objects.update()
# We start filtering out the deployed services that do not need caching at all.
whichNeedsCaching = DeployedService.objects.filter(Q(initial_srvs__gt=0) | Q(cache_l1_srvs__gt=0)).filter(max_srvs__gt=0, state=State.ACTIVE,
service__provider__maintenance_mode=False)[:]
whichNeedsCaching = DeployedService.objects.filter(Q(initial_srvs__gte=0) | Q(cache_l1_srvs__gte=0)).filter(max_srvs__gte=0, state=State.ACTIVE,
service__provider__maintenance_mode=False)[:]
# We will get the one that proportionally needs more cache
servicesPools = []