[
https://issues.apache.org/jira/browse/GOBBLIN-1887?focusedWorklogId=878448&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-878448
]
ASF GitHub Bot logged work on GOBBLIN-1887:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 25/Aug/23 18:49
Start Date: 25/Aug/23 18:49
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3749:
URL: https://github.com/apache/gobblin/pull/3749#discussion_r1306034249
##########
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'm getting these confused, but want to ensure they're not mixed up... where
could I find a comment explaining the difference (or is it worth adding one
here)?
Issue Time Tracking
-------------------
Worklog Id: (was: 878448)
Time Spent: 0.5h (was: 20m)
> Increase Encapsulation in FlowTriggerHandler & Add Unit Tests
> -------------------------------------------------------------
>
> Key: GOBBLIN-1887
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1887
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-service
> Reporter: Urmi Mustafi
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Increase abstraction and encapsulation in {{FlowTriggerHandler}} with minor
> refactoring to static helper functions. Unpack objects as late as possible to
> make {{scheduleReminderForEvent}} easier to read. Add unit tests for each of
> the static helper functions.
> Bug fix 1: Ensure that the {{reminderJobKey}} is also used as the
> {{reminderTrigger's}} key
> Bug fix 2: Utilize the {{jobProps}} to determine {{triggerEventTimeMillis}}
> for reminder events
--
This message was sent by Atlassian Jira
(v8.20.10#820010)