-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
56 lines (44 loc) · 1.39 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
NAME
Dainamo - manage worker processes.
SYNOPSIS
use Dainamo;
my $dainamo = Dainamo->new(
max_workers => 10,
);
$dainamo->add_profile(
profile => Dainamo::Profile::Gearman->new(
name => 'Project1',
config => {
job_servers => '127.0.0.1:7003',
workers => [qw( Project1::Worker::Job1 Project1::Worker::Job2 )],
}
),
);
$dainamo->load_profiles('/path/to/project2/config.pl');
if ( $ENV{DEVELOPMENT} ) {
} else {
$dainamo->daemonize(1);
}
$dainamo->run;
in path/to/project2/config.pl
use strict;
use warnings;
use Dainamo::ProfileGroup;
my $group = Dainamo::ProfileGroup->new;
$group->add_profile(profile => Dainamo::Profile::Gearman->new(
name => 'Project2'
config => {
job_servers => '127.0.0.1:7003',
workers => [ qw(Project2::Worker::Job1 Project2::Worker::Job2 ],
}
);
DESCRIPTION
Dainamo is an apllication that manage worker process.
THIS SOFTWARE IS ALPHA QUALITIY. API MAY CHANGE IN FUTURE.
Api is in discussion at <irc://irc.freenode.org/#dainamo>
AUTHOR
Keiji Yoshimi <walf443 at gmail dot com>
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.