Home  |  Linux  | Mysql  | PHP  | XML
From:Malte S. Stretz Date:Wed Jan  3 13:16:18 2007
Subject:Re: [PATCH] Advanced tagging and filtering
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

Attachment: [application/x-perl] 55filtered.t
Attachment: [text/x-diff] IPC-DirQueue-head2.patch
Navigate in group perl.ipc.dirqueue at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants