perl.ipc.dirqueue
  Home FAQ Contact Sign in
perl.ipc.dirqueue only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
perl.ipc.dirqueue Profileā€¦
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  released version 1.0 of IPC::DirQueue         


Author: Justin Mason
Date: Apr 18, 2008 08:44

Hi --

Version 1.0 of IPC::DirQueue is now released, and should be showing
up on CPAN rsn. Changes since 0.09:

- worker_still_working() is broken; it always claimed that the worker was
no longer running. Fix thanks to Brian Duggan
org>

- use buffered print instead of unbuffered syswrite() when creating data
files using enqueue_sub()

- fix code to match POD documentation regarding the range of chars
permitted in metadata during enqueueing, thanks to Brian Grossman for
report

- update POD docs: visit_all_jobs() does not return a value. thanks to
Simon on AnnoCPAN:
http://annocpan.org/%%7eJMASON/IPC-DirQueue-0.09/lib/IPC/DirQueue.pm#note_1570

[the 1.0 version bump is just because
-- no good reason. ;)
this isn't really more stable than any other version!]

--j.
no comments
  released version 0.09 of IPC::DirQueue         


Author: Justin Mason
Date: Apr 27, 2007 13:40

Hi --

Version 0.09 of IPC::DirQueue is now released, and should be showing
up on CPAN rsn. Changes since 0.08:

------------------------------------------------------------------------
r8418 | jmason | 2006-12-21 19:00:03 +0000 (Thu, 21 Dec 2006) | 1 line

add IPC::DirQueue::Job::get_data() API, to access queued job data directly
as a string instead of as a filename, thanks to Collin Winter gmail.com>

------------------------------------------------------------------------
r8379 | jmason | 2006-12-11 20:32:13 +0000 (Mon, 11 Dec 2006) | 1 line

fix documentation; it was unclear for beginners as to how job data got
into and out of IPC::DirQueue, and that reading/writing files is required

------------------------------------------------------------------------
r8103 | jmason | 2006-11-24 14:27:37 +0000 (Fri, 24 Nov 2006) | 1 line

fix platform-specific tests: must use 'use constant' in the conditional
variables, otherwise the tests appear to be failing on win32 platforms
when in fact we're just trying to skip them (see
http://www.nntp.perl.org/group/perl.cpan.testers/377405 for example)
Show full article (1.31Kb)
no comments
  Re: cancelling queued items         


Author: Justin Mason
Date: Mar 21, 2007 08:49

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? ...
Show full article (1.00Kb)
2 Comments
  Re: usage question         


Author: Thomas J Pinkl
Date: Mar 5, 2007 09:06

On Mon, Mar 05, 2007 at 11:28:03AM -0500, Thomas J Pinkl wrote:
> Justin, here's a patch which adds an optional "readonly" parameter
> to visit_all_jobs(). If the parameter isn't passed, then it defaults
> to true, thus maintaining backward compatibility. The patch
> includes changes to the POD as well. It's against the current SVN
> source.

Perhaps I whipped this up too quickly. The read-only flag works, as
far as it goes, but jobs are not considered "active" when read-only
is false.

If I understand the code correctly, then I'll also have to do
something to make the job "active" from within visit_all_jobs().

Is that correct?

--
Thomas J. Pinkl | T: 215-442-9300
Senior Systems Architect | 800-444-1427
Health Business Systems, Inc | F: 215-442-7555
An SXC Company |
738 Louis Drive | http://www.hbsrx.com/
Warminster, PA 18974 | http://www.sxc.com/
no comments
  Re: usage question         


Author: Thomas J Pinkl
Date: Mar 5, 2007 08:28

On Mon, Mar 05, 2007 at 11:24:07AM +0000, Justin Mason wrote:
> Alternatively, I'd be happy to apply a patch that implements
> a version of visit_all_jobs() which allows writes somehow, or
> a way to access a job returned by visit_all_jobs() and render
> it writable.

Justin, here's a patch which adds an optional "readonly" parameter
to visit_all_jobs(). If the parameter isn't passed, then it defaults
to true, thus maintaining backward compatibility. The patch
includes changes to the POD as well. It's against the current SVN
source.

--
Thomas J. Pinkl | T: 215-442-9300
Senior Systems Architect | 800-444-1427
Health Business Systems, Inc | F: 215-442-7555
An SXC Company |
738 Louis Drive | http://www.hbsrx.com/
Warminster, PA 18974 | http://www.sxc.com/
Show full article (2.49Kb)
no comments
  usage question         


Author: Thomas J Pinkl
Date: Mar 3, 2007 08:37

I'm attempting to use IPC::DirQueue 0.08 for a project where messages
are queued for later processing. However, when dequeuing these
messages, it will be possible that a message cannot be processed
immediately, but could be processed later.

I thought I'd be able to use IPC::DirQueue like this:

my $dq = IPC::DirQueue->new( \%%dq_opts );
while (1) {
my $job = $dq->pickup_queued_job();
last if (! $job);

my $rc = &process;_job( $job );
if ($rc) {
$job->finish();
} else {
$job->return_to_queue();
}
}
Show full article (1.51Kb)
1 Comment
  getting: Illegal octal digit '8'         


Author: Thomas J Pinkl
Date: Jan 16, 2007 10:40

I've just started using IPC::DirQueue 0.08. Thanks to the author(s)
for a module that appears to deliver exactly what I need.

I received these warnings:

Illegal octal digit '8' ignored at \
/usr/lib/perl5/site_perl/5.6.1/IPC/DirQueue.pm line 146.
Illegal octal digit '8' ignored at \
/usr/lib/perl5/site_perl/5.6.1/IPC/DirQueue.pm line 148.

which corresponds to this section of code:

$self->{data_file_mode} ||= '0666';
$self->{data_file_mode} = oct ($self->{data_file_mode});
$self->{queue_file_mode} ||= '0666';
$self->{queue_file_mode} = oct ($self->{queue_file_mode});

in sub new(). Lines 146 and 148 are the ones that use 'oct'.

The fix would appear to be:

146: $self->{data_file_mode} = oct sprintf "0%%o",$self->{data_file_mode};

148: $self->{queue_file_mode} = oct sprintf "0%%o",$self->{queue_file_mode};

Can anyone else confirm this?
Show full article (1.22Kb)
2 Comments
  [PATCH] Advanced tagging and filtering         


Author:
Date: Dec 29, 2006 12:51

Hi Justin,

I was looking for a nice IPC module on CPAN and what did I find? Yet
another Perl Module created by you :)

Unfortunately was IPC::DirQueue really slow in one of the cases I tried to
use it for. Thats why I wrote the attached patch. But first: What do I
need?

I have a server which has a tcpdump running, listening for UDP packets, and
where you can connect via TCP to request notifications about some kind of
packets. The notifications are based on ids which are inside the UDP
packets. (This is actually used to do some UDP hole punching as a
University project.)

So we've got two parallel queues, one for the incoming requests and one for
the outgoing replies. On the one side we can have n processes pushing
requests into the incoming queue and waiting for replies on the outgoing
one. On the other side is just a single consumer/producer, which parses
the tcpdump output, looks wether there's a request for the id in the
incoming queue and if so, puts a reply into the outgoing queue which is
then sent via TCP to the user.
Show full article (22.67Kb)
1 Comment
  released version x.xx of IPC::DirQueue         


Author: Justin Mason
Date: Nov 21, 2006 05:12

Hi --

Version 0.08 of IPC::DirQueue is now released, and should be showing
up on CPAN rsn. Changes since 0.07:

------------------------------------------------------------------------
r8093 | jmason | 2006-11-21 13:04:53 +0000 (Tue, 21 Nov 2006) | 1 line

add t/12_no_dir.t, to test for bug 21312 (no queue directory causes die())
------------------------------------------------------------------------
r6840 | jmason | 2006-09-04 11:18:38 +0100 (Mon, 04 Sep 2006) | 1 line

calling visit_all_jobs() with a nonexistent queue directory triggered some broken err
or-handling code, resulting in a die(); fixed. thanks to Keith Amling, http://rt.cpa
n.org/Public/Bug/Display.html?id=21312
------------------------------------------------------------------------
r6839 | jmason | 2006-09-04 11:16:10 +0100 (Mon, 04 Sep 2006) | 1 line

documentation clarification on queue structure; some of the grammar was poor
------------------------------------------------------------------------
r6694 | jmason | 2006-07-24 14:10:27 +0100 (Mon, 24 Jul 2006) | 1 line

adding CHANGES file to svn
1 Comment