Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python APScheduler中的长时间运行作业以及FastAPI_Python_Flask_Gunicorn_Fastapi_Apscheduler - Fatal编程技术网

Python APScheduler中的长时间运行作业以及FastAPI

Python APScheduler中的长时间运行作业以及FastAPI,python,flask,gunicorn,fastapi,apscheduler,Python,Flask,Gunicorn,Fastapi,Apscheduler,我有一个FastAPI服务,它公开了一些RESTAPI,并使用gunicorn作为服务器 我还有一个长期运行的APScheduler作业,需要不断运行。如果我从init_app.py内运行调度程序作业,该作业由gunicorn工作线程启动,则会出现以下错误,工作线程将重新启动: [关键]工作超时(pid:4994) PID为4994的引导工作程序 我的问题是,启动AP调度器和FastAPI rest端点的最佳方式是什么

我有一个FastAPI服务,它公开了一些RESTAPI,并使用gunicorn作为服务器

我还有一个长期运行的APScheduler作业,需要不断运行。如果我从init_app.py内运行调度程序作业,该作业由gunicorn工作线程启动,则会出现以下错误,工作线程将重新启动:

[关键]工作超时(pid:4994)
PID为4994的引导工作程序

我的问题是,启动AP调度器和FastAPI rest端点的最佳方式是什么