umustafi commented on code in PR #3749:
URL: https://github.com/apache/gobblin/pull/3749#discussion_r1306065616


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -725,12 +725,24 @@ public void executeImpl(JobExecutionContext context) 
throws JobExecutionExceptio
 
       // Obtain trigger timestamp from trigger to pass to jobProps
       Trigger trigger = context.getTrigger();
-      // THIS current event has already fired if this method is called, so it 
now exists in <previousFireTime>
-      long triggerTimestampMillis = 
asUTCEpochMillis(trigger.getPreviousFireTime());
-      
jobProps.setProperty(ConfigurationKeys.SCHEDULER_EVENT_TO_TRIGGER_TIMESTAMP_MILLIS_KEY,
-          String.valueOf(triggerTimestampMillis));
-      _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime: {} 
nextTriggerTime: {} - Job triggered by "
-              + "scheduler", triggerTimestampMillis, 
asUTCEpochMillis(trigger.getNextFireTime()));
+      long triggerTimestampMillis;
+      // If the trigger is a reminder type event then utilize the trigger time 
saved in job properties rather than the
+      // actual firing time
+      if (jobDetail.getKey().getName().contains("reminder")) {
+        triggerTimestampMillis = Long.parseLong(
+            
jobProps.getProperty(ConfigurationKeys.SCHEDULER_EVENT_TO_TRIGGER_TIMESTAMP_MILLIS_KEY,
 "0"));
+        long eventToRevisit = Long.parseLong(
+            
jobProps.getProperty(ConfigurationKeys.SCHEDULER_EVENT_TO_REVISIT_TIMESTAMP_MILLIS_KEY,
 "0"));

Review Comment:
   I'll put a comment in `ConfigurationKeys` where they are defined because 
they are also referenced in `FlowTriggerHandler` and it's confusing there too I 
know. 



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