ruanwenjun commented on code in PR #18464:
URL:
https://github.com/apache/dolphinscheduler/pull/18464#discussion_r3725357736
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:
##########
@@ -401,6 +403,10 @@ public List<String> previewSchedule(User loginUser, String
schedule) {
.collect(Collectors.toList());
}
+ private ScheduleMissedFirePolicy
defaultMissedFirePolicy(ScheduleMissedFirePolicy missedFirePolicy) {
+ return missedFirePolicy == null ?
ScheduleMissedFirePolicy.FIRE_ALL_MISSED : missedFirePolicy;
+ }
Review Comment:
Is this needed? Your already set a initialize value at `scheduleParam`.
##########
dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/FireOnceNowCronScheduleBuilderFactory.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.scheduler.quartz;
+
+import org.quartz.CronScheduleBuilder;
+
+final class FireOnceNowCronScheduleBuilderFactory implements
CronScheduleBuilderFactory {
+
+ @Override
+ public CronScheduleBuilder createCronScheduleBuilder(String
cronExpression) {
+ return CronScheduleBuilder.cronSchedule(cronExpression)
+ .withMisfireHandlingInstructionFireAndProceed();
+ }
Review Comment:
```suggestion
public CronScheduleBuilder createCronScheduleBuilder(Schedule schedule) {
return CronScheduleBuilder.cronSchedule(cronExpression)
.withMisfireHandlingInstructionFireAndProceed()
.inTimeZone(DateUtils.getTimezone(schedule.getTimezoneId()));
}
```
--
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]