Only report files as enqueued for analysis which actually are
This commit is contained in:
parent
217e54d81c
commit
aa57277ff8
2 changed files with 4 additions and 3 deletions
|
|
@ -212,8 +212,8 @@ class FileManager(object):
|
|||
|
||||
# we'll use the default printer profile for the backlog since we don't know better
|
||||
queue_entry = QueueEntry(entry, file_type, storage_type, path, self._printer_profile_manager.get_default())
|
||||
self._analysis_queue.enqueue(queue_entry, high_priority=False)
|
||||
counter += 1
|
||||
if self._analysis_queue.enqueue(queue_entry, high_priority=False):
|
||||
counter += 1
|
||||
self._logger.info("Added {counter} items from storage type \"{storage_type}\" to analysis queue".format(**locals()))
|
||||
|
||||
def add_storage(self, storage_type, storage_manager):
|
||||
|
|
|
|||
|
|
@ -68,9 +68,10 @@ class AnalysisQueue(object):
|
|||
|
||||
def enqueue(self, entry, high_priority=False):
|
||||
if not entry.type in self._queues:
|
||||
return
|
||||
return False
|
||||
|
||||
self._queues[entry.type].enqueue(entry, high_priority=high_priority)
|
||||
return True
|
||||
|
||||
def pause(self):
|
||||
for queue in self._queues.values():
|
||||
|
|
|
|||
Loading…
Reference in a new issue