Closed Miksus closed 1 year ago
This is already implemented and will be in v2.4.0:
@app.task()
def mytask(x, y):
...
task = app.session["mytask"]
task.run(x=5, y="value")
task.run
will set the task to the run queue of the task (called batches
) which the scheduler will pick when it has time. The parameters supplied to the method will override all others that overlap.
Is your feature request related to a problem? Please describe. When running a task manually (using
force_run
), sometimes it's useful to pass parameters for this particular manual run.Describe the solution you'd like Possibly a core change. An attribute
manual_parameters
or so that are used only once and only when the task is run withforce_run
.Describe alternatives you've considered Cannot think of such.