Skip to content

Commit

Permalink
Remove transaction wrapping tasks which prevents transactions from be…
Browse files Browse the repository at this point in the history
…ing used within the task
  • Loading branch information
benhowes committed Dec 13, 2023
1 parent 575279e commit 780ac3a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pgq/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ def inner(queue, job):

try:
args = copy.deepcopy(job.args)
with transaction.atomic():
result = fn(
queue, job, args["func_args"], JobMetaType(**args["meta"])
)
result = fn(
queue, job, args["func_args"], JobMetaType(**args["meta"])
)
except Exc as e:
retries = job.args["meta"].get("retries", 0)
if retries < max_retries:
Expand Down

0 comments on commit 780ac3a

Please sign in to comment.