Skip to content

Commit

Permalink
Allows arguments in @connect decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Oct 4, 2018
1 parent 5c9627f commit 7ff9279
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@

## Current (in progress)

- Nothing yet
- Allows arguments and keyword arguments in the task `@connect` decorator

## 1.6.0 (2018-10-02)

Expand Down
4 changes: 2 additions & 2 deletions udata/tasks.py
Expand Up @@ -88,9 +88,9 @@ def get_logger(name):
return logger


def connect(signal):
def connect(signal, *args, **kwargs):
def wrapper(func):
t = task(func)
t = task(func, *args, **kwargs)

def call_task(item, **kwargs):
t.delay(item, **kwargs)
Expand Down

0 comments on commit 7ff9279

Please sign in to comment.