perl-IPC-Concurrency-DBI-1.2.0-alt1.noarch.rpm


Advertisement

Description

perl-IPC-Concurrency-DBI - Control how many instances of an application run in parallel, using DBI as the IPC method

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-IPC-Concurrency-DBI
Package version 1.2.0
Package release alt1
Package architecture noarch
Package type rpm
Installed size 47.39 KB
Download size 47.39 KB
Official Mirror ftp.altlinux.org
This module controls how many instances of a given program are allowed to run
in parallel. It does not manage forking or starting those instances.
You can use this module for example to prevent more than one instance of a
program from running at any given time, or to never have more than N instances
running in parallel to prevent exhausting all the available resources.
It uses DBI as a storage layer for information about instances and applications,
which is particularly useful in contexts where Sarbanes-Oxley regulations allow
you database access but not file write rights in production environments.
_# Configure the concurrency object.
_use IPC::Concurrency::DBI;
_my $concurrency_manager = IPC::Concurrency::DBI->new(
__'database_handle' => $dbh,
__'verbose'         => 1,
_);
_# Create the tables that the concurrency manager needs to store information
_# about the applications and instances.
_$concurrency_manager->create_tables();
_# Register cron_script.pl as an application we want to limit to 10 parallel
_# instances. We only need to do this once, obviously.
_$concurrency_manager->register_application(
__name              => 'cron_script.pl',
__maximum_instances => 10,
_);
_# Retrieve the application.
_my $application = $concurrency_manager->get_application(
__name => 'cron_script.pl',
_);
_# Count how many instances are currently running.
_my $instances_count = $application->get_instances_count();
_# NOT IMPLEMENTED YET: Get a list of what instances are currently running.
_# my $instances = $application->get_instances_list()
_# Start a new instance of the application. If this returns undef, we've
_# reached the limit.
_unless ( my $instance = $application->start_instance() )
_{
__print "Too many instances of $0 are already running.\n";
__exit;
_}
_# [...] Do some work.
_# Now that the application is about to exit, flag the instance as completed.
_# (note: this is implicit when $instance is destroyed).
_$instance->finish();

Alternatives

Package Version Architecture Repository
perl-IPC-Concurrency-DBI - - -

Requires

Name Value
/usr/share/perl5 -
perl(Data/Dumper.pm) -
perl(Data/Validate/Type.pm) -
rpmlib(PayloadIsLzma) -

Provides

Name Value
perl(IPC/Concurrency/DBI.pm) = 1.002
perl(IPC/Concurrency/DBI/Application.pm) = 1.002
perl(IPC/Concurrency/DBI/Application/Instance.pm) = 1.002
perl-IPC-Concurrency-DBI = 1.2.0-alt1

Download

Type URL
Binary Package perl-IPC-Concurrency-DBI-1.2.0-alt1.noarch.rpm
Source Package perl-IPC-Concurrency-DBI-1.2.0-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-IPC-Concurrency-DBI rpm package:
    # sudo apt-get install perl-IPC-Concurrency-DBI

Files

Path
/usr/share/doc/perl-IPC-Concurrency-DBI-1.2.0/Changes
/usr/share/doc/perl-IPC-Concurrency-DBI-1.2.0/LICENSE
/usr/share/doc/perl-IPC-Concurrency-DBI-1.2.0/README.md
/usr/share/doc/perl-IPC-Concurrency-DBI-1.2.0/ignore.txt
/usr/share/doc/perl-IPC-Concurrency-DBI-1.2.0/examples/examples.txt
/usr/share/perl5/IPC/
/usr/share/perl5/IPC/Concurrency/DBI.pm
/usr/share/perl5/IPC/Concurrency/DBI/Application.pm
/usr/share/perl5/IPC/Concurrency/DBI/Application/Instance.pm

See Also

Package Description
perl-IPC-ConcurrencyLimit-0.17-alt1.noarch.rpm Lock-based limits on cooperative multi-processing
perl-IPC-ConcurrencyLimit-Lock-MySQL-0.03-alt1.noarch.rpm Locking via MySQL GET_LOCK
perl-IPC-ConcurrencyLimit-Lock-NFS-0.01-alt1.noarch.rpm Locking via NFS
perl-IPC-ConcurrencyLimit-Lock-Redis-0.03-alt1.noarch.rpm Locking via Redis
perl-IPC-DirQueue-1.0-alt1_26.noarch.rpm Disk-based many-to-many task queue
perl-IPC-Exe-2.002001-alt1.noarch.rpm Execute processes or Perl subroutines & string them via IPC. Think shell pipes
perl-IPC-Filter-0.005-alt1_4.noarch.rpm Filter data through an external process
perl-IPC-Fork-Simple-1.47-alt1.noarch.rpm perl module IPC-Fork-Simple
perl-IPC-ForkPipe-0.01-alt1.noarch.rpm Perl extension for blah blah blah
perl-IPC-GimpFu-0.03-alt1.noarch.rpm interface to Gimp's script-fu server
perl-IPC-LDT-2.03-alt1.noarch.rpm implements a length based IPC protocol
perl-IPC-LeaderBoard-0.04-alt2.noarch.rpm fast per-symbol online get/update information
perl-IPC-Lite-0.5.40-alt1.noarch.rpm IPC shared variables using SQLite
perl-IPC-Lock-0.20-alt1.noarch.rpm simple and safe local/network locking
perl-IPC-Lock-RabbitMQ-0.007-alt1.noarch.rpm Simple and reliable scoped locking for coarse grained locks
Advertisement
Advertisement