You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Tommaso Teofili <to...@gmail.com> on 2014/06/16 15:53:46 UTC

[event] JobManager.findJobs question

Hi all,

while working with Sling replication I found a strange behavior, probably
changed recently (as I didn't have it before), where calling:

Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1);

returns me all the queued jobs, while calling:

Map<String,Object> props = new HashMap<String,Object>();
Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1,
props);

returns an empty collection.

I don't think that's expected (a void template should work as no template
given) and also it's a different behavior between 3.3.0 (my "provided"
version) and 3.3.10 (my actual version).
Am I missing something?

Regards,
Tommaso

Re: [event] JobManager.findJobs question

Posted by Carsten Ziegeler <cz...@apache.org>.
I've created and fixed SLING-3725

Carsten


2014-07-01 11:33 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Hi Tommaso,
>
> could you please open an issue for this?
>
> Thanks
> Carsten
>
>
> 2014-06-17 9:30 GMT+02:00 Stefan Egli <st...@apache.org>:
>
> Hi Tommaso,
>>
>> That sounds indeed odd. From a code point of view both should be
>> equivalent, as findJobs checks for ( templates != null && templates.length
>> > 0 ) - so an empty props Map should not have any influence at all..
>>
>> Cheers,
>> Stefan
>>
>> On 6/16/14 3:53 PM, "Tommaso Teofili" <to...@gmail.com> wrote:
>>
>> >Hi all,
>> >
>> >while working with Sling replication I found a strange behavior, probably
>> >changed recently (as I didn't have it before), where calling:
>> >
>> >Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1);
>> >
>> >returns me all the queued jobs, while calling:
>> >
>> >Map<String,Object> props = new HashMap<String,Object>();
>> >Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1,
>> >props);
>> >
>> >returns an empty collection.
>> >
>> >I don't think that's expected (a void template should work as no template
>> >given) and also it's a different behavior between 3.3.0 (my "provided"
>> >version) and 3.3.10 (my actual version).
>> >Am I missing something?
>> >
>> >Regards,
>> >Tommaso
>>
>>
>>
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>



-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: [event] JobManager.findJobs question

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Tommaso,

could you please open an issue for this?

Thanks
Carsten


2014-06-17 9:30 GMT+02:00 Stefan Egli <st...@apache.org>:

> Hi Tommaso,
>
> That sounds indeed odd. From a code point of view both should be
> equivalent, as findJobs checks for ( templates != null && templates.length
> > 0 ) - so an empty props Map should not have any influence at all..
>
> Cheers,
> Stefan
>
> On 6/16/14 3:53 PM, "Tommaso Teofili" <to...@gmail.com> wrote:
>
> >Hi all,
> >
> >while working with Sling replication I found a strange behavior, probably
> >changed recently (as I didn't have it before), where calling:
> >
> >Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1);
> >
> >returns me all the queued jobs, while calling:
> >
> >Map<String,Object> props = new HashMap<String,Object>();
> >Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1,
> >props);
> >
> >returns an empty collection.
> >
> >I don't think that's expected (a void template should work as no template
> >given) and also it's a different behavior between 3.3.0 (my "provided"
> >version) and 3.3.10 (my actual version).
> >Am I missing something?
> >
> >Regards,
> >Tommaso
>
>
>


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: [event] JobManager.findJobs question

Posted by Stefan Egli <st...@apache.org>.
Hi Tommaso,

That sounds indeed odd. From a code point of view both should be
equivalent, as findJobs checks for ( templates != null && templates.length
> 0 ) - so an empty props Map should not have any influence at all..

Cheers,
Stefan

On 6/16/14 3:53 PM, "Tommaso Teofili" <to...@gmail.com> wrote:

>Hi all,
>
>while working with Sling replication I found a strange behavior, probably
>changed recently (as I didn't have it before), where calling:
>
>Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1);
>
>returns me all the queued jobs, while calling:
>
>Map<String,Object> props = new HashMap<String,Object>();
>Collection<Job> jobs = jobManager.findJobs(QueryType.QUEUED, topic, -1,
>props);
>
>returns an empty collection.
>
>I don't think that's expected (a void template should work as no template
>given) and also it's a different behavior between 3.3.0 (my "provided"
>version) and 3.3.10 (my actual version).
>Am I missing something?
>
>Regards,
>Tommaso