Skip to content

Instantly share code, notes, and snippets.

@kazeburo
Created June 14, 2012 08:43
Show Gist options
  • Select an option

  • Save kazeburo/2929104 to your computer and use it in GitHub Desktop.

Select an option

Save kazeburo/2929104 to your computer and use it in GitHub Desktop.
use Proclet;
my $proclet = Proclet->new;
# add service
$proclet->service(
code => sub {
my $job = $jobqueue->grab;
work($job);
},
worker => 2,
);
$proclet->service(
code => sub {
my $loader = Plack::Loader->load(
'Starlet',
port => $port,
host => $host || 0,
max_workers => 4,
);
$loader->run($app);
},
);
$proclet->service(
code => sub {
exec('/usr/bin/memcached','-p','11211');
},
);
$proclet->run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment