From af0892a899d09023eb0e61eecb63e03dc2fd3b60 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Mon, 27 Jun 2022 10:55:47 +0200 Subject: [PATCH] topological sorting of definitions by caller hierarchy --- pyinfra/component_factory.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyinfra/component_factory.py b/pyinfra/component_factory.py index 17733e0..c0b0e9d 100644 --- a/pyinfra/component_factory.py +++ b/pyinfra/component_factory.py @@ -60,6 +60,13 @@ class ComponentFactory: def get_queue_manager(self): return PikaQueueManager(self.config.rabbitmq.queues.input, self.config.rabbitmq.queues.output) + @staticmethod + @lru_cache(maxsize=None) + def get_pipeline(endpoint): + return ClientPipeline( + RestPacker(), RestDispatcher(endpoint), RestReceiver(), rcompose(RestPickupStreamer(), RestReceiver()) + ) + @lru_cache(maxsize=None) def get_storage(self): return storages.get_storage(self.config.storage.backend) @@ -100,10 +107,3 @@ class ComponentFactory: bucket_name=parse_disjunction_string(self.config.storage.bucket), file_descriptor_manager=self.get_file_descriptor_manager(), ) - - @staticmethod - @lru_cache(maxsize=None) - def get_pipeline(endpoint): - return ClientPipeline( - RestPacker(), RestDispatcher(endpoint), RestReceiver(), rcompose(RestPickupStreamer(), RestReceiver()) - )