From 0826dd53a68f56237d1a3168d0f41fad897e39c0 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 13 Jul 2019 22:22:30 +0200 Subject: [PATCH] FIX: LifoQueue.get is blocking. Check if the queue is empty instead --- platypush/procedure/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platypush/procedure/__init__.py b/platypush/procedure/__init__.py index e8f18a50..cd1ff26c 100644 --- a/platypush/procedure/__init__.py +++ b/platypush/procedure/__init__.py @@ -108,10 +108,9 @@ class Procedure(object): request = Request.build(request_config) reqs.append(request) - pending_if = if_config.get() - while pending_if: - reqs.append(IfProcedure.build(**pending_if)) + while not if_config.empty(): pending_if = if_config.get() + reqs.append(IfProcedure.build(**pending_if)) return procedure_class(name=name, _async=_async, requests=reqs, args=args, backend=backend, **kwargs)