dan-s1 commented on code in PR #8063:
URL: https://github.com/apache/nifi/pull/8063#discussion_r1428029603


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/MonitorActivity.java:
##########
@@ -300,7 +312,11 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
 
             if (isInactive) {
                 final boolean continual = 
context.getProperty(CONTINUALLY_SEND_MESSAGES).asBoolean();
-                sendInactiveMarker = !inactive.getAndSet(true) || (continual 
&& (now > lastInactiveMessage.get() + thresholdMillis));
+                if (!initialInactivityIndicator) {
+                    sendInactiveMarker = (!inactive.getAndSet(true) || 
(continual && (now > lastInactiveMessage.get() + thresholdMillis))) && 
hasSuccessTransfer.get();
+                } else {
+                    sendInactiveMarker = !inactive.getAndSet(true) || 
(continual && (now > lastInactiveMessage.get() + thresholdMillis));
+                }

Review Comment:
   `!inactive.getAndSet(true) || (continual && (now > 
lastInactiveMessage.get()` is common code between lines 316 and 318. Can you 
please assign this to a variable whose name should describe what these 
conditions are and then use the variable on lines 316 and 318? Thanks!



-- 
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: issues-unsubscr...@nifi.apache.org

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

Reply via email to