Created
June 14, 2012 08:43
-
-
Save kazeburo/2929104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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