meethngala commented on code in PR #3742:
URL: https://github.com/apache/gobblin/pull/3742#discussion_r1304604872


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -291,6 +291,10 @@ private boolean addSpecHelperMethod(Spec spec) {
    */
   @VisibleForTesting
   public static boolean isWithinRange(String cronExpression, int 
maxNumDaysToScheduleWithin) {
+    if (cronExpression == null || cronExpression.trim().isEmpty()) {
+      // If the cron expression is empty or null, return true to capture adhoc 
flows
+      return true;
+    }

Review Comment:
   I agree and the callers are not passing `null` . I wanted to cover the case 
for adhoc flows where we don't have any schedule... but checking for empty 
strings should suffice. 



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