Fixed regression in processors handling

Used old ways with a dict mapping an extension to its name.

Change-Id: I5da781bb82dca9bba29ca4612c8d4cbe45d8dbd7
This commit is contained in:
Stéphane Albert
2015-04-21 18:57:37 +02:00
parent 262b231ce7
commit 3d91f8c908

View File

@@ -179,15 +179,15 @@ class Worker(BaseWorker):
try: try:
data = self._collect(service, timestamp) data = self._collect(service, timestamp)
# Rating # Rating
for processor in self._processors.values(): for processor in self._processors:
processor.process(data) processor.obj.process(data)
# Writing # Writing
self._storage.append(data, self._tenant_id) self._storage.append(data, self._tenant_id)
except collector.NoDataCollected: except collector.NoDataCollected:
begin = timestamp begin = timestamp
end = begin + self._period end = begin + self._period
for processor in self._processors.values(): for processor in self._processors:
processor.nodata(begin, end) processor.obj.nodata(begin, end)
self._storage.nodata(begin, end, self._tenant_id) self._storage.nodata(begin, end, self._tenant_id)
# We're getting a full period so we directly commit # We're getting a full period so we directly commit