英文:
Deploy the scheduler application on multiple servers without running all of them
问题
我有一个具有调度程序的Python应用程序,我想要将其部署到多个服务器上。
问题:
如果我将我的应用程序部署到多个服务器上,所有的调度都会运行,但我只需要其中一个。
我不想在数据库中定义一个字段,然后通过它来确定调度程序是否应该运行,我正在寻找另一种不保存任何信息的解决方案。
谢谢。
英文:
I have a python app that have scheduler and i want deploy it on multiple server.
Problem:
If I deploy my app to multiple servers, all schedules run, but I only need one of them.
* I don't want to define a field in the database and find out through it whether the scheduler should run or not, I am looking for another solution to not save anything anywhere**
Thanks.
答案1
得分: 1
禁用调度器并尝试通过外部微服务进行调度。例如,如果您想要以开源方式执行此操作,可以使用Airflow和Prefect。如果您在AWS上,可以使用EventBridge和Lambda微服务来实现此目的。
英文:
disable the scheduler and try to schedule it via a microservice from outside. As for example if you want to do this opensource you can use airflow and prefect. If you are on AWS you can use EventBridge, lambda
Microservice for this purpose.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论