zhangshenghang commented on code in PR #7693:
URL: https://github.com/apache/seatunnel/pull/7693#discussion_r1793506148
##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java:
##########
@@ -195,6 +216,82 @@ public CoordinatorService(
masterActiveListener = Executors.newSingleThreadScheduledExecutor();
masterActiveListener.scheduleAtFixedRate(
this::checkNewActiveMaster, 0, 100, TimeUnit.MILLISECONDS);
+ isJobPending =
+
engineConfig.getScheduleStrategy().equals(ScheduleStrategy.WAIT) &&
!dynamicSlot;
+ if (isJobPending) {
+ logger.info("Start pending job schedule thread");
+ // start pending job schedule thread
+ startPendingJobScheduleThread();
+ }
+ }
+
+ private void startPendingJobScheduleThread() {
+ Runnable pendingJobScheduleTask =
+ () -> {
+
Thread.currentThread().setName("pending-job-schedule-runner");
+ while (true) {
+ try {
+ // sleep 5s , not too frequent
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ pendingJobSchedule();
Review Comment:
already modify
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]