英文:
If the deployment has 2 replicas, will the scheduler in quarkus be executed 2 times?
问题
我是中文翻译,以下是翻译好的部分:
am new to kubernetes. i have question about kubernetes.
i have quarkus deployment and have scheduling periodic tasks.
is there any chance that the scheduler will run as many replicas?
@Scheduled(cron="3 0 2 * * ?")
英文:
am new to kubernetes. i have question about kubernetes.
i have quarkus deployment and have scheduling periodic tasks.
is there any chance that the scheduler will run as many replicas?
@Scheduled(cron="3 0 2 * * ?")
答案1
得分: 1
是的。
除非您在应用程序之间实现某种类型的集群,否则复制品是独立的进程,将执行相同的操作。
英文:
Yes.
Unless you implement some kind of clustering in between your applications, replicas are standalone processes that would execute just the same.
答案2
得分: 0
如果您想要为每个集群安排单个任务执行,您将需要使用集群化的Quartz设置:https://quarkus.io/guides/quartz
英文:
Yes, if you want to schedule a single task execution per cluster you will need to use a clustered quartz setup: https://quarkus.io/guides/quartz
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论