develooper Front page | perl.ipc.dirqueue | Postings from January 2007

Re: [PATCH] Advanced tagging and filtering

Thread Previous | Thread Next
From:
Malte S. Stretz
Date:
January 3, 2007 12:16
Subject:
Re: [PATCH] Advanced tagging and filtering
Message ID:
200701032116.21820@malte.stretz.eu.org
On Wednesday 03 January 2007 16:38 CET Justin Mason wrote:
> backwards compatibility is not a problem here, so go ahead and
> add the tag in addition to the hash.
>
> I think the best location is just before the hash, e.g.
>
>     50.20040909232529941258.TAG.HASH[.PID.RAND]
>
> (vs the simple
>
>     50.20040909232529941258.HASH[.PID.RAND]
>
> when tags are not in use.)
>
> > Actually, when people start to filter the files based on their name,
> > the format must not change anymore in future.  Maybe the filter should
> > apply to the tag only...
>
> Yes, I think that's a good idea... people shouldn't have to worry about
> the rest of the filename changing.

Ok, attached is a patch on top of the last one which changes the code as you 
described it above.  Additionally there's a revamped test.

While I was hunting another totally stupid bug, I found out that I actually 
forgot to add the $filter in the second call to pickup_job in wait_for_job.  
Gave some nasty surprises.  And visit_all_jobs now supports $filter, too.

The syntax for $filter has changed a bit:  If it is a string, it must be 
equal the tag, if it is a RE created with qr// it is matched as a RE.

Can you update the QUEUE DIRECTORY STRUCTURE section for me?  Your English 
is a lot better than mine :)

Cheers,
Malte


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About