Skip to content

Commit

Permalink
Fix ordering of task derivers.
Browse files Browse the repository at this point in the history
Bump to alpha 2.
  • Loading branch information
luhn committed Jun 1, 2021
1 parent e6b4943 commit 2c60e8d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyramid_tasks/taskderivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _apply_task_derivers(config, task, name, options):
original_func=task,
)
for name, deriver in reversed(derivers):
task = deriver(info, task)
task = deriver(task, info)
return task


Expand Down
2 changes: 1 addition & 1 deletion pyramid_tasks/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def includeme(config):
config.add_task_deriver(transaction_task_deriver)


def transaction_task_deriver(info, task):
def transaction_task_deriver(task, info):
def deriver(request, *args, **kwargs):
with request.tm:
return task(request, *args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyramid-tasks
version = 0.3.0a1
version = 0.3.0a2
author = Theron Luhn
author_email = [email protected]
description = Bring parity to Pyramid and Celery by creating a full Pyramid application in the Celery worker and providing a request object for each task.
Expand Down
2 changes: 1 addition & 1 deletion tests/pkgs/deriverapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __setitem__(self, key, value):
self._store[key] = value


def transaction_task_deriver(info, task):
def transaction_task_deriver(task, info):
if not info.options.get("in_transaction", False):
return task

Expand Down

0 comments on commit 2c60e8d

Please sign in to comment.