diff --git a/pipeline/handlers/handler.py b/pipeline/handlers/handler.py index 945ccda..83882c3 100644 --- a/pipeline/handlers/handler.py +++ b/pipeline/handlers/handler.py @@ -36,22 +36,20 @@ class Handler(QueueThread, metaclass=ABCMeta): tempdir, config): """ - Factory method to create a number of Handler instances based on the - count given in the config for a specific handler. + Factory method to create a number of Handler instances based on + handler-specific configuration. Only intended to be called on a subclass. - Returns a list of at least one instance of the Handler in question. + This default implementation returns one instance of the Handler in + question (wrapped in a list). """ - instances = [] - for i in range(config.get('count', 1)): - instances.append(cls(handlerqueue, - collector, - worker, - ldap, - tempdir, - config)) - return instances + return [cls(handlerqueue, + collector, + worker, + ldap, + tempdir, + config)] def _process(self, queueitem): """