TypeError: Decorator() Missing 1 Required Positional Argument: 'func'
I'm trying to use python huey (https://github.com/coleifer/huey/blob/master/huey/api.py) to allow usage of a task queue with flask. Starting with a function: def some_long_calcul
Solution 1:
Based on the error message, task returns a decorator (usually used with @ as a syntax sugar).
Try this code instead:
from . import my_huey
some_long_calculation_task = my_huey.task()(some_long_calculation)
The "normal" usage from this would be something like
@my_huey.task()
def my_function(...):
...
Post a Comment for "TypeError: Decorator() Missing 1 Required Positional Argument: 'func'"