phet commented on code in PR #3853:
URL: https://github.com/apache/gobblin/pull/3853#discussion_r1446798677


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerUtils.java:
##########
@@ -397,15 +390,15 @@ static List<String> getDistinctUniqueRequesters(String 
serializedRequesters) {
     }
   }
 
-  public static void 
submitInitializationEventsAndSetStatus(Dag<JobExecutionPlan> dag, 
Optional<EventSubmitter> eventSubmitter) {
-    if (eventSubmitter.isPresent()) {
+  public static void submitAndSet(Dag<JobExecutionPlan> dag, 
Optional<EventSubmitter> eventSubmitter) {

Review Comment:
   what did you think of my prior suggestion to lift the conditional processing 
out of this method?  instead it would always take action and we'd leave it to 
the caller to evaluate the `Optional<EventSubmitter>` and decide whether or not 
to call this method



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java:
##########
@@ -338,7 +338,7 @@ public synchronized void addDag(Dag<JobExecutionPlan> dag, 
boolean persist, bool
       throw new IOException("Could not add dag" + dagId + "to queue");
     }
     if (setStatus) {
-      DagManagerUtils.submitInitializationEventsAndSetStatus(dag, 
this.eventSubmitter);
+      DagManagerUtils.submitAndSet(dag, this.eventSubmitter);

Review Comment:
   reading it used here, it would be clearer if named `submitPendingExecStatus



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