Will-Lo commented on code in PR #3861:
URL: https://github.com/apache/gobblin/pull/3861#discussion_r1456336521


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -615,6 +615,8 @@ public AddSpecResponse onAddSpec(Spec addedSpec) {
       }
       if (PropertiesUtils.getPropAsBoolean(jobConfig, 
ConfigurationKeys.FLOW_RUN_IMMEDIATELY, "false")) {
         _log.info("RunImmediately requested, hence executing FlowSpec: " + 
addedSpec);
+        // Use 0 for trigger event time of a run-immediately flow
+        
jobConfig.setProperty(ConfigurationKeys.ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY,
 "0");

Review Comment:
   Is there a scenario where we don't set this key? Wouldn't it be better to 
handle this on the reader side e.g. the `orchestrator` class?
   I see this snippet:
   ```
             _log.warn("Skipping execution of spec: {} because missing trigger 
timestamp in job properties",
                 jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY));
             flowMetadata.put(TimingEvent.METADATA_MESSAGE, "Flow orchestration 
skipped because no trigger timestamp "
                 + "associated with flow action.");
             if (this.eventSubmitter.isPresent()) {
               new TimingEvent(this.eventSubmitter.get(), 
TimingEvent.FlowTimings.FLOW_FAILED).stop(flowMetadata);
             }
             return;
           }
    ```



-- 
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]

Reply via email to