Mais conteúdo relacionado
Semelhante a The Schwartz plugin by yokohama.pm #3 (20)
The Schwartz plugin by yokohama.pm #3
- 7. 今回やった拡張 - Parallel ※ before package MyApp::Worker1; use base qw/ TheSchwartz::Worker /; sub work{ my ( $class , $job ) = @_; # blah blah blah } package main; use TheSchwartz; my $client = TheSchwartz->new( ・・・ ); $client->can_do(‘MyApp::Worker1’); $client->work();
- 8. 今回やった拡張 - Parallel ※ after use TheSchwartz::Worker::Plugin::Parallel; my @classes = qw/ MyApp::Worker1 MyApp::Worker2 /; TheSchwartz::Worker::Plugin::Parallel->work( classes );