Skip to content

Commit

Permalink
Fix redis pipeline created and not used (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamlikeme authored Dec 14, 2022
1 parent 430df07 commit e6ff090
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arq/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e6ff090

Please sign in to comment.