From e3e652d4e18ffc901a8f95af20af988df17c6c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= <dkmaster@dkmon.com> Date: Sat, 31 Jan 2015 10:18:12 +0100 Subject: [PATCH] Fixed cache updater, so now we can select "0 elements" for cache, initials, etc.. --- server/src/uds/core/workers/ServiceCacheUpdater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/uds/core/workers/ServiceCacheUpdater.py b/server/src/uds/core/workers/ServiceCacheUpdater.py index 6c3e77346..13e98037a 100644 --- a/server/src/uds/core/workers/ServiceCacheUpdater.py +++ b/server/src/uds/core/workers/ServiceCacheUpdater.py @@ -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 = []