You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cs...@apache.org on 2024/09/19 07:52:49 UTC

(sling-org-apache-sling-distribution-journal) branch master updated: SLING-12436 - Make scheduling more robust by using a named thread pool

This is an automated email from the ASF dual-hosted git repository.

cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git


The following commit(s) were added to refs/heads/master by this push:
     new 688a11e  SLING-12436 - Make scheduling more robust by using a named thread pool
688a11e is described below

commit 688a11e06ab763c9fd1ae67c7895594b0a2f5ac4
Author: Christian Schneider <cs...@adobe.com>
AuthorDate: Thu Sep 19 09:52:42 2024 +0200

    SLING-12436 - Make scheduling more robust by using a named thread pool
---
 .../sling/distribution/journal/impl/discovery/DiscoveryService.java     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/sling/distribution/journal/impl/discovery/DiscoveryService.java b/src/main/java/org/apache/sling/distribution/journal/impl/discovery/DiscoveryService.java
index 2dbc0a9..ff806e2 100644
--- a/src/main/java/org/apache/sling/distribution/journal/impl/discovery/DiscoveryService.java
+++ b/src/main/java/org/apache/sling/distribution/journal/impl/discovery/DiscoveryService.java
@@ -31,6 +31,7 @@ import java.util.Hashtable;
 import javax.annotation.ParametersAreNonnullByDefault;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.sling.commons.scheduler.Scheduler;
 import org.apache.sling.distribution.journal.MessageInfo;
 import org.apache.sling.distribution.journal.MessagingProvider;
 import org.apache.sling.distribution.journal.Reset;
@@ -163,6 +164,7 @@ public class DiscoveryService implements Runnable {
         Dictionary<String, Object> props = new Hashtable<>();
         props.put(PROPERTY_SCHEDULER_CONCURRENT, false);
         props.put(PROPERTY_SCHEDULER_PERIOD, 5L); // every 5 seconds
+        props.put(Scheduler.PROPERTY_SCHEDULER_THREAD_POOL, "content-distribution");
         reg = context.registerService(Runnable.class.getName(), this, props);
     }