Python, Celery, Flask, “working outside of application context”
问题 I am trying to schedule tasks using Celery and Python for a Flask app. I basically want to run a function in another directory every x amount of time and make it a celery task. I import the function test_check and I try and put it under a celery task called testcheck(), however, I get the error: working outside of application context How can I fix this? Here is my setup: from app import app from celery import Celery from datetime import timedelta from app.mod_check.views import test_check