After receiving request I want to run sanic-scheduler function. I want to do something like this:
@app.route("/api/new-answer", methods=["POST"])
def new_answer(request):
@task(timedelta(seconds=2)) # I want to run this task
def check_data_status(app):
print("Do SMTH")
But it does not work. Could anybody help me?