r16439 - in /trunk/libpoe-component-jobqueue-perl: CHANGES JobQueue.pm MANIFEST META.yml Makefile.PL README debian/changelog debian/compat debian/control debian/copyright debian/docs debian/rules t/01_queues.t
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Tue Mar 4 04:12:39 UTC 2008
Author: tincho-guest
Date: Tue Mar 4 04:12:38 2008
New Revision: 16439
URL: http://svn.debian.org/wsvn/?sc=1&rev=16439
Log:
* New upstream release
* Bumped debhelper compatibility to 5.
* debian/control:
- Added myself to Uploaders.
- Bumped Standards-Version (no changes).
- Separate B-D-I from B-D.
* debian/rules: redone from templates, don't install README anymore.
* debian/copyright: updated and new format.
Removed:
trunk/libpoe-component-jobqueue-perl/debian/docs
Modified:
trunk/libpoe-component-jobqueue-perl/CHANGES
trunk/libpoe-component-jobqueue-perl/JobQueue.pm
trunk/libpoe-component-jobqueue-perl/MANIFEST
trunk/libpoe-component-jobqueue-perl/META.yml
trunk/libpoe-component-jobqueue-perl/Makefile.PL
trunk/libpoe-component-jobqueue-perl/README
trunk/libpoe-component-jobqueue-perl/debian/changelog
trunk/libpoe-component-jobqueue-perl/debian/compat
trunk/libpoe-component-jobqueue-perl/debian/control
trunk/libpoe-component-jobqueue-perl/debian/copyright
trunk/libpoe-component-jobqueue-perl/debian/rules
trunk/libpoe-component-jobqueue-perl/t/01_queues.t
Modified: trunk/libpoe-component-jobqueue-perl/CHANGES
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/CHANGES?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/CHANGES (original)
+++ trunk/libpoe-component-jobqueue-perl/CHANGES Tue Mar 4 04:12:38 2008
@@ -1,20 +1,21 @@
=========================
-2004-05-19 16:13:42 v0_54
+2006-08-09 13:24:28 v0_55
=========================
- 2004-05-19 16:13:42 by rcaputo; JobQueue.pm 1.10
+ 2006-08-09 13:23:57 (r23) by rcaputo; JobQueue.pm M
- Zach Thompson reported the hash keys problem that was previously
- patched, reminding me that I hadn't actually released the fix to the
- world. Here I am bumping the version number so I can release it to
- the CPAN.
+ Andrew Hoying (blm.gov) added support for a "stop" command that
+ allows queues to be stopped before they run out of jobs.
- 2003-11-29 23:18:56 by rcaputo; JobQueue.pm 1.9; t/01_queues.t 1.8
+ 2005-06-21 18:50:16 (r22) by rcaputo; MANIFEST M; Makefile.PL M
- Applied neyuki's patch to correct some typos in hash keys and
- parameter names. This also corrects the worker respond logic in
- active queues.
+ Remove META.yml from MANIFEST since it's created at "make dist" time.
+ Updated Makefile.PL to generate CHANGES from Subversion commits.
-=============================
-Beginning of Recorded History
-=============================
+ 2005-05-05 05:37:56 (r21) by rcaputo; MANIFEST M
+
+ Add META.yml to the MANIFEST.
+
+==============
+End of Excerpt
+==============
Modified: trunk/libpoe-component-jobqueue-perl/JobQueue.pm
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/JobQueue.pm?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/JobQueue.pm (original)
+++ trunk/libpoe-component-jobqueue-perl/JobQueue.pm Tue Mar 4 04:12:38 2008
@@ -1,4 +1,4 @@
-# $Id: JobQueue.pm,v 1.10 2004/05/19 16:13:42 rcaputo Exp $
+# $Id: JobQueue.pm 23 2006-08-09 13:23:57Z rcaputo $
# License and documentation are after __END__.
package POE::Component::JobQueue;
@@ -6,7 +6,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.54';
+$VERSION = '0.55';
use Carp qw (croak);
@@ -194,8 +194,24 @@
$heap->{worker_limit}, ")"
) if $heap->{worker_count} > $heap->{worker_limit};
$heap->{worker_count}--;
- $kernel->yield('dequeue') unless $heap->{latest_worker};
- }
+ $kernel->yield('dequeue') unless (
+ $heap->{latest_worker} or $heap->{stopped}
+ );
+ }
+}
+
+# Remove the alias, stop active polling and delete outstanding job queue
+
+sub poco_jobqueue_both_stop {
+ my ($kernel, $heap) = @_[KERNEL, HEAP];
+
+ $kernel->alias_remove($heap->{alias});
+ $kernel->alarm_remove_all();
+
+ delete $heap->{pollinterval} if ($heap->{pollinterval});
+ delete $heap->{job_queue} if ($heap->{job_queue});
+
+ $heap->{stopped} = 1;
}
# Attempt to fill empty worker slots.
@@ -222,7 +238,10 @@
}
# Attempt to fill the empty worker slots.
- while ($heap->{worker_count} < $heap->{worker_limit}) {
+ while (
+ not $heap->{stopped}
+ and $heap->{worker_count} < $heap->{worker_limit}
+ ) {
# Call the worker to fetch a new job and spawn a session.
my $previous_worker_count = $heap->{worker_count};
@@ -247,7 +266,10 @@
my ($kernel, $heap) = @_[KERNEL, HEAP];
# Attempt to fill the empty worker slots.
- while ($heap->{worker_count} < $heap->{worker_limit}) {
+ while (
+ not $heap->{stopped}
+ and $heap->{worker_count} < $heap->{worker_limit}
+ ) {
# Try to fetch another job from the queue.
my $next_job = shift @{ $heap->{job_queue} };
@@ -269,6 +291,14 @@
sub poco_jobqueue_passive_enqueue {
my ($kernel, $sender, $heap, $return_state, @job) =
@_[KERNEL, SENDER, HEAP, ARG0..$#_];
+
+ if ($heap->{stopped}) {
+ DEBUG and warn(
+ "JQ: $heap->{alias} can not enqueue new jobs after 'stop'\n"
+ );
+
+ return;
+ }
DEBUG and warn "JQ: job queue $heap->{alias} enqueuing a new job";
@@ -373,6 +403,9 @@
print "results of finished job: (@job_response)\n";
}
+ # Stop a running queue
+ $kernel->call( 'active' => 'stop' );
+
=head1 DESCRIPTION
POE::Component::JobQueue manages a finite pool of worker sessions as
@@ -552,6 +585,12 @@
receive jobs from the outside; instead, they poll for them and post
acknowledgements as they're completed.
+Running queues can be stopped by posting a "stop" state to the
+component. Any currently running workers will be allowed to
+complete, but no new workers will be started.
+
+ $kernel->call( 'queue' => 'stop' ); # Stop the running queue
+
=head1 SEE ALSO
This component is built upon and POE. Please see its source code and
Modified: trunk/libpoe-component-jobqueue-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/MANIFEST?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/MANIFEST (original)
+++ trunk/libpoe-component-jobqueue-perl/MANIFEST Tue Mar 4 04:12:38 2008
@@ -1,4 +1,4 @@
-# $Id: MANIFEST,v 1.1 2000/09/04 20:19:57 rcaputo Exp $
+# $Id: MANIFEST 22 2005-06-21 18:50:16Z rcaputo $
CHANGES
JobQueue.pm
MANIFEST
Modified: trunk/libpoe-component-jobqueue-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/META.yml?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/META.yml (original)
+++ trunk/libpoe-component-jobqueue-perl/META.yml Tue Mar 4 04:12:38 2008
@@ -1,11 +1,13 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: POE-Component-JobQueue
-version: 0.54
-version_from: JobQueue.pm
-installdirs: site
-requires:
- POE: 0.11
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+--- #YAML:1.0
+name: POE-Component-JobQueue
+version: 0.55
+abstract: Handle large numbers of tasks with finite numbers of workers.
+license: unknown
+generated_by: ExtUtils::MakeMaker version 6.30_01
+author: Rocco Caputo <rcaputo at cpan.org>
+distribution_type: module
+requires:
+ POE: 0.31
+meta-spec:
+ url: <http://module-build.sourceforge.net/META-spec-new.html>;
+ version: 1.1
Modified: trunk/libpoe-component-jobqueue-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/Makefile.PL?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/Makefile.PL (original)
+++ trunk/libpoe-component-jobqueue-perl/Makefile.PL Tue Mar 4 04:12:38 2008
@@ -1,27 +1,29 @@
#!/usr/bin/perl
-# $Id: Makefile.PL,v 1.3 2002/09/10 03:42:50 rcaputo Exp $
+# $Id: Makefile.PL 22 2005-06-21 18:50:16Z rcaputo $
use ExtUtils::MakeMaker;
# Touch CHANGES so it exists.
open(CHANGES, ">>CHANGES") and close CHANGES;
-WriteMakefile
- ( NAME => 'POE::Component::JobQueue',
- AUTHOR => 'Rocco Caputo <rcaputo at cpan.org>',
- ABSTRACT => ( 'POE component for processing large numbers of tasks ' .
- 'with finite numbers of workers.'
- ),
- VERSION_FROM => 'JobQueue.pm',
+WriteMakefile(
+ NAME => 'POE::Component::JobQueue',
+ AUTHOR => 'Rocco Caputo <rcaputo at cpan.org>',
+ ABSTRACT => (
+ 'Handle large numbers of tasks with finite numbers of workers.'
+ ),
+ VERSION_FROM => 'JobQueue.pm',
- PM => { 'JobQueue.pm' => '$(INST_LIBDIR)/JobQueue.pm' },
- PREREQ_PM => { POE => 0.11,
- },
- dist =>
- { COMPRESS => 'gzip -9f',
- SUFFIX => 'gz',
- PREOP => ( 'cvs-log.perl | ' .
- 'tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES'
- ),
- },
- );
+ PM => { 'JobQueue.pm' => '$(INST_LIBDIR)/JobQueue.pm' },
+ PREREQ_PM => {
+ POE => 0.31,
+ },
+ dist => {
+ COMPRESS => 'gzip -9f',
+ SUFFIX => 'gz',
+ PREOP => (
+ 'svn-log.perl --repo https://thirdlobe.com/svn/poco-jobqueue | ' .
+ 'tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES'
+ ),
+ },
+);
Modified: trunk/libpoe-component-jobqueue-perl/README
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/README?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/README (original)
+++ trunk/libpoe-component-jobqueue-perl/README Tue Mar 4 04:12:38 2008
@@ -1,4 +1,4 @@
-$Id: README,v 1.2 2001/05/29 17:54:55 rcaputo Exp $
+$Id: README 3 2001-05-29 17:54:55Z rcaputo $
--------
Abstract
Modified: trunk/libpoe-component-jobqueue-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/debian/changelog?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/debian/changelog (original)
+++ trunk/libpoe-component-jobqueue-perl/debian/changelog Tue Mar 4 04:12:38 2008
@@ -1,4 +1,4 @@
-libpoe-component-jobqueue-perl (0.5402-2) UNRELEASED; urgency=low
+libpoe-component-jobqueue-perl (0.5500-1) unstable; urgency=low
[ gregor herrmann ]
* Take over for the Debian Perl Group on maintainer's request; cf.
@@ -13,8 +13,16 @@
[ MartÃn Ferrari ]
* debian/watch: added uversionmangle to cope with two-digit versioning.
* debian/patches/: moved source modification to a proper patch.
+ * New upstream release
+ * Bumped debhelper compatibility to 5.
+ * debian/control:
+ - Added myself to Uploaders.
+ - Bumped Standards-Version (no changes).
+ - Separate B-D-I from B-D.
+ * debian/rules: redone from templates, don't install README anymore.
+ * debian/copyright: updated and new format.
- -- gregor herrmann <gregor+debian at comodo.priv.at> Wed, 13 Feb 2008 21:43:30 +0100
+ -- MartÃn Ferrari <martin.ferrari at gmail.com> Tue, 04 Mar 2008 02:09:34 -0200
libpoe-component-jobqueue-perl (0.5402-1) unstable; urgency=low
Modified: trunk/libpoe-component-jobqueue-perl/debian/compat
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/debian/compat?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/debian/compat (original)
+++ trunk/libpoe-component-jobqueue-perl/debian/compat Tue Mar 4 04:12:38 2008
@@ -1,1 +1,1 @@
-4
+5
Modified: trunk/libpoe-component-jobqueue-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/debian/control?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/debian/control (original)
+++ trunk/libpoe-component-jobqueue-perl/debian/control Tue Mar 4 04:12:38 2008
@@ -1,9 +1,11 @@
Source: libpoe-component-jobqueue-perl
Section: perl
Priority: optional
-Build-Depends-Indep: debhelper (>= 4.0.0), perl (>= 5.6.0-17), libpoe-perl
+Build-Depends: debhelper (>= 5)
+Build-Depends-Indep: perl (>= 5.6.0-17), libpoe-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Standards-Version: 3.6.1
+Uploaders: MartÃn Ferrari <martin.ferrari at gmail.com>
+Standards-Version: 3.7.3
Homepage: http://search.cpan.org/dist/POE-Component-JobQueue/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpoe-component-jobqueue-perl/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-jobqueue-perl/
Modified: trunk/libpoe-component-jobqueue-perl/debian/copyright
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/debian/copyright?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/debian/copyright (original)
+++ trunk/libpoe-component-jobqueue-perl/debian/copyright Tue Mar 4 04:12:38 2008
@@ -1,16 +1,25 @@
This package was debianized by Steve Kowalik <stevenk at debian.org> on
Thu, 25 Oct 2001 22:54:54 +1000.
+It was downloaded from http://search.cpan.org/dist/POE-Component-JobQueue/
+Upstream Author: Rocco Caputo <rcaputo at cpan.org>.
-It was downloaded from http://www.cpan.org/authors/id/R/RC/RCAPUTO/
+Files: *
+Copyright: © 1999-2002 Rocco Caputo <rcaputo at cpan.org>
+License: GPL-1+ | Artistic
+ POE::Component::JobQueue is Copyright 1999-2002 by Rocco Caputo. All
+ rights are reserved. POE::Component::JobQueue is free software; you
+ may redistribute it and/or modify it under the same terms as Perl
+ itself.
-Upstream Author: Rocco Caputo <troc+cpan at netrus.net>
+Files: debian/*
+Copyright: © 2008 Debian Perl Group
+ <pkg-perl-maintainers at lists.alioth.debian.org>
+ © 2001-2004 Steve Kowalik <stevenk at debian.org>
+License: other
+ It is assumed that the previous maintainer did choose a license compatible
+ with the software.
-Copyright:
-
-POE::Component::JobQueue is Copyright 1999-2000 by Rocco Caputo. All
-rights are reserved. POE::Component::JobQueue is free software; you may
-redistribute it and/or modify it under the same terms as Perl itself.
-
-The GPL and Artistic licenses can be found under
-/usr/share/common-licenses/{GPL,Artistic} on Debian systems.
-
+Perl is distributed under your choice of the GNU General Public License or
+the Artistic License. On Debian GNU/Linux systems, the complete text of the
+GNU General Public License can be found in `/usr/share/common-licenses/GPL'
+and the Artistic License in `/usr/share/common-licenses/Artistic'.
Modified: trunk/libpoe-component-jobqueue-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/debian/rules?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/debian/rules (original)
+++ trunk/libpoe-component-jobqueue-perl/debian/rules Tue Mar 4 04:12:38 2008
@@ -1,68 +1,57 @@
#!/usr/bin/make -f
-#-*- makefile -*-
-# Made with the aid of dh_make, by Craig Small
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-# Some lines taken from debmake, by Christoph Lameter.
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
-ifndef PERL
-PERL = /usr/bin/perl
-endif
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
+
+PACKAGE = $(shell dh_listpackages)
+PERL ?= /usr/bin/perl
+TMP = $(CURDIR)/debian/$(PACKAGE)
build: build-stamp
build-stamp:
dh_testdir
-
-
- # Add here commands to compile the package.
$(PERL) Makefile.PL INSTALLDIRS=vendor
- $(MAKE) OPTIMIZE="-O2 -Wall"
-
- touch build-stamp
+ $(MAKE)
+ $(MAKE) test
+ touch $@
clean:
dh_testdir
dh_testroot
- rm -f build-stamp
+ dh_clean build-stamp install-stamp
+ [ ! -f Makefile ] || $(MAKE) realclean
- # Add here commands to clean up after the build process.
- -$(MAKE) realclean
-
- dh_clean
-
-install:
+install: install-stamp
+install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+ [ ! -d $(TMP)/usr/lib/perl5 ] || \
+ rmdir --ignore-fail-on-non-empty --parents --verbose \
+ $(TMP)/usr/lib/perl5
+ touch $@
- ${MAKE} test
- $(MAKE) install PREFIX=$(CURDIR)/debian/libpoe-component-jobqueue-perl/usr
+binary-arch:
+# We have nothing to do here for an architecture-independent package
-
-# Build architecture-dependent files here.
-binary-arch: build install
-# We have nothing to do by default.
-
-# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
- dh_installdocs
- dh_installexamples
- dh_installman
+ dh_installdocs
dh_installchangelogs CHANGES
- dh_link
- dh_strip
+ dh_perl
dh_compress
dh_fixperms
dh_installdeb
- dh_perl
- dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
-source diff:
+source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
Modified: trunk/libpoe-component-jobqueue-perl/t/01_queues.t
URL: http://svn.debian.org/wsvn/trunk/libpoe-component-jobqueue-perl/t/01_queues.t?rev=16439&op=diff
==============================================================================
--- trunk/libpoe-component-jobqueue-perl/t/01_queues.t (original)
+++ trunk/libpoe-component-jobqueue-perl/t/01_queues.t Tue Mar 4 04:12:38 2008
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $Id: 01_queues.t,v 1.8 2003/11/29 23:18:56 rcaputo Exp $
+# $Id: 01_queues.t 18 2003-11-29 23:18:56Z rcaputo $
use strict;
More information about the Pkg-perl-cvs-commits
mailing list