2012/8/11 Robert A. Decker <[email protected]>:
> Job queues look like exactly what I'm looking for. I missed them in the api.
> Thanks.
>
> I've been trying to launch one using some of the properties but it doesn't
> seem to launch. Can they just fail silently without throwing exceptions?
Hmm, actually no, unless there is some hidden bug
>
> The props are:
> props {event.job.priority=NORM, event.job.retries=5,
> property.user_id=100004152510575, event.job.run.local=true,
> event.job.retrydelay=30000, topic.update.sub=user.initial.update,
> event.job.parallel=10, event.job.
> queuename=user.queue}
>
> If I remove event.job.* properties it works fine, just not in the way I want
> it to run.
And if you just keep the event.job.queuename property?
Maybe enabling debug logging for org.apache.sling.event gives more
information. In this case it should log all steps.
Regards
Carsten
>
> Rob
>
>
> On Aug 10, 2012, at 3:15 AM, Carsten Ziegeler wrote:
>
>> OSGi eventing by itself has no priority - the Sling job handling
>> doesn't have this either. The JobPriority you're referring to, is just
>> used to set the priority of the thread executing the job. But it
>> doesn't contol when this thread will be started.
>>
>> But you could put your A and B jobs into different job queues -
>> configure one for each - if you then configure the priority for the B
>> queue to MAX, B jobs are performed with a higher priority than A
>> tasks. However this gives you only minimum control and does not ensure
>> that A jobs are processed before a new B job.
>>
>> Regards
>> Carsten
>>
>> 2012/8/10 Robert A. Decker <[email protected]>:
>>> Hi,
>>>
>>> EventUtil.JobPriority is deprecated. Reading the docs I'm not sure how I'd
>>> use it anyway, unless it's just used automatically be the osgi eventing
>>> system.
>>>
>>> Since it's deprecated is there another way to set job priorities?
>>>
>>> I have a situation where event type A fires off high-priority event types B
>>> that should preferably be processed before any other already existing event
>>> type A are processed.
>>>
>>> Rob
>>
>>
>>
>> --
>> Carsten Ziegeler
>> [email protected]
>>
>
--
Carsten Ziegeler
[email protected]