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 . importmy_hueysome_long_calculation_task= my_huey.task()(some_long_calculation)
The "normal" usage from this would be something like
@my_huey.task()defmy_function(...):
...
Share
Post a Comment
for "Typeerror: Decorator() Missing 1 Required Positional Argument: 'func'"
Post a Comment for "Typeerror: Decorator() Missing 1 Required Positional Argument: 'func'"