markap14 commented on code in PR #10736:
URL: https://github.com/apache/nifi/pull/10736#discussion_r2676409216


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/components/connector/StandardConnectorValidationTrigger.java:
##########
@@ -42,10 +43,23 @@ public StandardConnectorValidationTrigger(final 
ExecutorService threadPool, fina
     public void triggerAsync(final ConnectorNode connector) {
         if (!flowInitialized.getAsBoolean()) {
             logger.debug("Triggered to perform validation on {} asynchronously 
but flow is not yet initialized so will ignore validation", connector);
+            threadPool.schedule(() -> triggerAsync(connector), 1, 
TimeUnit.SECONDS);
             return;
         }
 
-        threadPool.submit(() -> trigger(connector));
+        threadPool.submit(() -> {
+            try {
+                if (connector.isValidationPaused()) {
+                    logger.debug("Connector {} is currently marked as having 
validation paused; will retry in 1 second", connector);
+                    threadPool.schedule(() -> triggerAsync(connector), 1, 
TimeUnit.SECONDS);

Review Comment:
   Yeah, good call, will adjust.



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