Yes, that was it. It works fine now.
Rob
On May 30, 2013, at 1:30 PM, Robert A. Decker wrote:
> Do I need to create the event using JobUtil.TOPIC_JOB in order for it to be
> processed with the queues?
> new Event(JobUtil.TOPIC_JOB, props);
>
> and then if I set:
> PROPERTY_JOB_TOPIC
>
> sling will launch a new event with that topic that I monitor for and do my
> processing?
>
> I'm going to try this now.
>
> Rob
>
> On May 30, 2013, at 1:08 PM, Robert A. Decker wrote:
>
>> I'm having trouble with events/jobs. I'm trying to set a queue limit of 5
>> parallel jobs but it instead runs at around 35 jobs.
>>
>> My properties are:
>>
>> JobUtil.PROPERTY_JOB_QUEUE_NAME,
>> "nlp.startnlp"
>>
>> JobUtil.PROPERTY_JOB_PRIORITY,
>> JobUtil.JobPriority.NORM
>>
>> JobUtil.PROPERTY_JOB_PARALLEL,
>> 5
>>
>> JobUtil.PROPERTY_JOB_RUN_LOCAL,
>> "true"
>>
>> JobUtil.PROPERTY_JOB_RETRIES,
>> 5
>>
>> JobUtil.PROPERTY_JOB_RETRY_DELAY,
>> 30000
>>
>>
>> Then create the event like:
>> new Event("bmn/iarpa-metaphor/job/topic/init", props)
>>
>> and post it with eventAdmin.postEvent
>>
>>
>>
>> The job is processed by sling's JobUtil.processJob method. The thread is
>> renamed temporarily, priority set, etc while it's being executed, just as it
>> should based on JobUtil's processJob method (and the Runnable inside of it)
>>
>>
>> But it immediately fills up the default thread pool with jobs instead of
>> running only 5 jobs.
>>
>>
>> I've been tracing through the sling code but I'm having a hard time figuring
>> out what's going on. I've only found one place where
>> JobUtil.PROPERTY_JOB_PARALLEL is read, inside
>> InternalQueueConfiguration.java, but as far as I can tell the default thread
>> pool doesn't use this…
>>
>> Rob
>
>