pratapaditya04 commented on code in PR #4076: URL: https://github.com/apache/gobblin/pull/4076#discussion_r1842706800
########## gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java: ########## @@ -125,12 +130,37 @@ public AddSpecResponse onAddSpec(Spec addedSpec) { _log.info("New Spec detected of type TopologySpec: " + addedSpec); this.specCompiler.onAddSpec(addedSpec); } else if (addedSpec instanceof FlowSpec) { - _log.info("New Spec detected of type FlowSpec: " + addedSpec); + handleFlowSpec((FlowSpec) addedSpec); return this.specCompiler.onAddSpec(addedSpec); } return new AddSpecResponse<>(null); } + private void handleFlowSpec(FlowSpec flowSpec) { + _log.info(String.format("New Spec detected of type FlowSpec: " + flowSpec)); + if (!flowSpec.isScheduled()) { + processFlowSpecForAdhocFlows(flowSpec); + } + this.specCompiler.onAddSpec(flowSpec); + } + + private void processFlowSpecForAdhocFlows(FlowSpec flowSpec) { Review Comment: Since this function is validating whether or not the flow should be created based on whether it's a duplicate adhoc flow within a short span, can this be named differently to convey it's purpose like validateConcurrentAdhocFlowCreation ? -- 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-unsubscr...@gobblin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org