euscanwww: When scanning upstream output object was never cleaned
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
7367596e33
commit
bd971a7da0
@ -8,6 +8,8 @@ from celery.task.sets import TaskSet
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
from euscan import output as euscan_output
|
||||||
|
|
||||||
from djeuscan.models import Package, RefreshPackageQuery
|
from djeuscan.models import Package, RefreshPackageQuery
|
||||||
from djeuscan.management.commands.regen_rrds import regen_rrds
|
from djeuscan.management.commands.regen_rrds import regen_rrds
|
||||||
from djeuscan.management.commands.update_counters import update_counters
|
from djeuscan.management.commands.update_counters import update_counters
|
||||||
@ -129,8 +131,10 @@ def scan_upstream_task(query):
|
|||||||
logger = scan_upstream_task.get_logger()
|
logger = scan_upstream_task.get_logger()
|
||||||
logger.info("Starting upstream scanning for package %s ...", query)
|
logger.info("Starting upstream scanning for package %s ...", query)
|
||||||
|
|
||||||
|
euscan_output.clean()
|
||||||
scan_upstream = ScanUpstream()
|
scan_upstream = ScanUpstream()
|
||||||
result = scan_upstream.scan(query)
|
result = scan_upstream.scan(query)
|
||||||
|
euscan_output.clean()
|
||||||
if not result or result == {}:
|
if not result or result == {}:
|
||||||
raise TaskFailedException("Couldn't scan upstream")
|
raise TaskFailedException("Couldn't scan upstream")
|
||||||
return result
|
return result
|
||||||
|
@ -76,6 +76,10 @@ class EuscanOutput(object):
|
|||||||
self.queries = defaultdict(dict)
|
self.queries = defaultdict(dict)
|
||||||
self.current_query = None
|
self.current_query = None
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
|
self.queries = defaultdict(dict)
|
||||||
|
self.current_query = None
|
||||||
|
|
||||||
def set_query(self, query):
|
def set_query(self, query):
|
||||||
self.current_query = query
|
self.current_query = query
|
||||||
if query is None:
|
if query is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user