LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: (Justin Mason) Date: Wed Mar 21 09:49:00 2007 Subject: Re: cancelling queued items
Brian Duggan writes: > Hello, > > I'm using IPC::DirQueue -- very nice module, thanks. > > I wanted the ability to cancel not-yet-active items from > anywhere in the queue (a la lprm), and was trying > to think of a safe way to do it. It occurred to me > that one easy modification to IPC::DirQueue that would > allow this would be to have pickup_queued_job() take > an optional parameter which is the name of the data path, > and then just add something like > > next if exists($args{datapath}) && > $nextfile ne $args{datapath}; > > to the while loop. > > Any chance this could be incorporated? Or is there > already another safe way to cancel an item? It sounds pretty good -- just one thing -- how is a caller supposed to get the datapath? Presumably they don't construct it themselves... > thanks > Brian > > (p.s. happy to send a patch if you prefer) that's ok, that suggestion is a one-liner. Having said that -- a test case "t" script would rock though :) --j.
| 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 |