Permalink
Browse files

Stopped passing kwargs through to celery tasks.

  • Loading branch information...
1 parent 85a5694 commit f0bb9c52d70f2ee8b3ed2284e0cc7545092a5bcf @davbo davbo committed Mar 23, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 molly/conf/provider.py
View
@@ -31,10 +31,10 @@ def run(self, **kwargs):
base = Task
def run(self, *args, **kwargs):
meth = getattr(self.provider, self.true_method)
- return meth(*args, **kwargs)
+ return meth(*args)
def __call__(self, *args, **kwargs):
meth = getattr(self.provider, self.true_method)
- return meth(*args, **kwargs)
+ return meth(*args)
def __init__(self, provider=ins, run_every=run_every,
metadata=fun.task['initial_metadata'], base=base):
self.provider = provider
@@ -64,6 +64,12 @@ def after_return(self, status, value, *args, **kwargs):
def task(run_every=None, initial_metadata={}):
+ """Sets a .task attribute on each function decorated, this indictes
+ this function should be registered as a task with Celery
+
+ TODO: Extend this functionality to implement a wrapping function to
+ capture the kwargs passed through by celery.
+ """
def dec(fun):
fun.task = {'run_every': run_every,
'initial_metadata': initial_metadata}

0 comments on commit f0bb9c5

Please sign in to comment.