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


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -181,36 +179,43 @@ private void scheduleReminderForEvent(Properties 
jobProps, MultiActiveLeaseArbit
         this.jobDoesNotExistInSchedulerCount.inc();
         return;
       }
-      JobKey reminderJobKey = constructReminderJobKey(origJobKey, 
status.getEventTimeMillis());
-      JobDetailImpl jobDetail = createJobDetailForReminderEvent(origJobKey, 
reminderJobKey, cronExpression,
-          status.getEventTimeMillis(), originalEventTimeMillis);
-      // Create a new trigger that is set to fire at the minimum reminder wait 
time calculated
+      JobKey reminderJobKey = constructReminderJobKey(origJobKey, status);
+      JobDetailImpl jobDetail = createJobDetailForReminderEvent(origJobKey, 
reminderJobKey, status,
+          triggerEventTimeMillis, schedulerMaxBackoffMillis);
+      // Create a new trigger with a `reminder` suffix that is set to fire at 
the minimum reminder wait time calculated
       Trigger reminderTrigger = 
JobScheduler.createTriggerForJob(reminderJobKey,
-          (Properties) 
jobDetail.getJobDataMap().get(GobblinServiceJobScheduler.PROPERTIES_KEY), 
Optional.absent());
+          getJobPropertiesFromJobDetail(jobDetail), 
Optional.of(createSuffixForJobTrigger(status)));
       // TODO: remove this comment once we've confirmed this function works
-      log.info("Flow Trigger Handler - [{}, eventTimestamp: {}] -  attempting 
to schedule reminder for event {}",
-          flowAction, originalEventTimeMillis, status.getEventTimeMillis());
+      log.info("Flow Trigger Handler - [{}, eventTimestamp: {}] -  attempting 
to schedule reminder for event {} with"
+              + "reminderJobKey {} and reminderTriggerKey {}", flowAction, 
triggerEventTimeMillis,
+          status.getEventTimeMillis(), reminderJobKey, 
reminderTrigger.getKey());
       this.schedulerService.getScheduler().scheduleJob(jobDetail, 
reminderTrigger);

Review Comment:
   Good suggestion, updated!



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