You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/07/28 19:54:37 UTC

[GitHub] [gobblin] sv2000 commented on a change in pull request #3340: [GOBBLIN-1497] Reduce the number of calls on FlowSpec initialization where possible,…

sv2000 commented on a change in pull request #3340:
URL: https://github.com/apache/gobblin/pull/3340#discussion_r678608777



##########
File path: gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
##########
@@ -202,8 +202,9 @@ private void scheduleSpecsFromCatalog() {
     while (specUris.hasNext()) {
       Spec spec = this.flowCatalog.get().getSpecWrapper(specUris.next());
       try {
-        // Disable FLOW_RUN_IMMEDIATELY on service startup or leadership change
-        if (spec instanceof FlowSpec) {
+        // Disable FLOW_RUN_IMMEDIATELY on service startup or leadership change if the property is set to true
+        if (spec instanceof FlowSpec && ((FlowSpec) spec).getConfigAsProperties()
+            .getProperty(ConfigurationKeys.FLOW_RUN_IMMEDIATELY, "false").equals("true")) {

Review comment:
       Use PropertiesUtils.getPropAsBoolean() here and check for the boolean instead of the string value.




-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org