From 18e57eae76bd65746ca35e9bbae618445f126421 Mon Sep 17 00:00:00 2001 From: Piotr Janiszewski Date: Sun, 11 Dec 2022 21:10:40 +0100 Subject: [PATCH] Fix redis pipeline created and not used --- arq/jobs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arq/jobs.py b/arq/jobs.py index 4ba267b9..8028cbe7 100644 --- a/arq/jobs.py +++ b/arq/jobs.py @@ -102,9 +102,10 @@ async def result( poll_delay = pole_delay async for delay in poll(poll_delay): - async with self._redis.pipeline(transaction=True): - v = await self._redis.get(result_key_prefix + self.job_id) - s = await self._redis.zscore(self._queue_name, self.job_id) + async with self._redis.pipeline(transaction=True) as tr: + tr.get(result_key_prefix + self.job_id) # type: ignore[unused-coroutine] + tr.zscore(self._queue_name, self.job_id) # type: ignore[unused-coroutine] + v, s = await tr.execute() if v: info = deserialize_result(v, deserializer=self._deserializer)