You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2017/03/15 12:43:05 UTC

svn commit: r1787040 - /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/MainQueueConfiguration.java

Author: olli
Date: Wed Mar 15 12:43:05 2017
New Revision: 1787040

URL: http://svn.apache.org/viewvc?rev=1787040&view=rev
Log:
SLING-6287 support maxparallel for main job queue to be -1 or between 0.0 and 1.0

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/MainQueueConfiguration.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/MainQueueConfiguration.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/MainQueueConfiguration.java?rev=1787040&r1=1787039&r2=1787040&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/MainQueueConfiguration.java (original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/MainQueueConfiguration.java Wed Mar 15 12:43:05 2017
@@ -28,7 +28,6 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.PropertyOption;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.osgi.framework.Constants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -101,16 +100,8 @@ public class MainQueueConfiguration {
         queueProps.put(ConfigurationConstants.PROP_TOPICS, "*");
         queueProps.put(ConfigurationConstants.PROP_NAME, MAIN_QUEUE_NAME);
         queueProps.put(ConfigurationConstants.PROP_TYPE, InternalQueueConfiguration.Type.UNORDERED);
-
-        // check max parallel - this should never be lower than 2!
-        final int maxParallel = PropertiesUtil.toInteger(queueProps.get(ConfigurationConstants.PROP_MAX_PARALLEL),
-                ConfigurationConstants.DEFAULT_MAX_PARALLEL);
-        if ( maxParallel < 2 ) {
-            this.logger.debug("Ignoring invalid setting of {} for {}. Setting to minimum value: 2",
-                    maxParallel, ConfigurationConstants.PROP_MAX_PARALLEL);
-            queueProps.put(ConfigurationConstants.PROP_MAX_PARALLEL, 2);
-        }
         queueProps.put(Constants.SERVICE_PID, "org.apache.sling.event.impl.jobs.DefaultJobManager");
+        logger.debug("properties for queue {}: {}", MAIN_QUEUE_NAME, queueProps);
         this.mainConfiguration = InternalQueueConfiguration.fromConfiguration(queueProps);
     }