joerghoh commented on code in PR #54:
URL:
https://github.com/apache/sling-org-apache-sling-event/pull/54#discussion_r3071770537
##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -248,8 +248,10 @@ protected void unbindJobProcessingEnabledCondition(final
Condition condition) {
if (this.jobProcessingEnabledCondition == condition) {
this.jobProcessingEnabledCondition = null;
logger.info("Job processing readiness condition has been removed -
jobs will not be processed");
- // Signal jobs to stop before notifying listeners
- stopProcessing();
+ // Do NOT call stopProcessing() here — that destroys topology
state and prevents
+ // recovery when the condition returns (e.g. after a transient
readiness probe blip).
+ // The notifyListeners() call below will propagate the combined
state (topology AND
+ // readiness) to all listeners via the updated notifyListeners()
method.
Review Comment:
```suggestion
// Do NOT call stopProcessing() here, see SLING-....
```
##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -631,8 +633,9 @@ public void run() {
private void notifyListeners() {
synchronized (this.listeners) {
final TopologyCapabilities caps = this.topologyCapabilities;
+ final boolean active = caps != null && isJobProcessingEnabled();
Review Comment:
```suggestion
final boolean active = this.topologyCapabilities != null &&
isJobProcessingEnabled();
```
I would collapse these 2 statements into one.
--
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]