Cantella-Worker
view release on metacpan or search on metacpan
lib/Cantella/Worker/Role/Worker.pm view on Meta::CPAN
Begin the event loop
=head2 pause
=over 4
=item B<arguments:> none
=item B<return value:> none
=back
Stop polling for work.
=head2 resume
=over 4
=item B<arguments:> none
=item B<return value:> none
=back
Resume polling for work.
=head2 shutdown
=over 4
=item B<arguments:> none
=item B<return value:> none
=back
Stop polling for work and end the session after current jobs are done.
=head1 EVENT HANDLERS
The following methods are L<POE> event handlers. They are not meant to be called
directly and will not work if you do. When applicable, arguments will be passed
into the methods in ARG0, ARG1, etc.
=head2 _poll
=over 4
=item B<handles event:> C<poll>
=item B<arguments:> none
=item B<return value:> none
=back
Poll for work. If we find work, schedule another poll event due to execute
after the work event. If no jobs are found, schedule the next poll for
C<interval> seconds in the future. This ensures that the worker will always be
busy while there is work, but will control it's polling for work when there
isn't any available.
=head2 _work
=over 4
=item B<handles event:> C<work>
=item B<arguments:> C<$work_info>
=item B<return value:> none
=back
Do this one job.
=head2 _start
=over 4
=item B<handles event:> C<_start>
=item B<arguments:> none
=item B<return value:> none
=back
Start the polling process
=head2 _pause
=over 4
=item B<handles event:> C<_pause>
=item B<arguments:> C<$until>
=item B<return value:> none
=back
Pause the polling process until C<$until>
=head2 _resume
=over 4
=item B<handles event:> C<_resume>
=item B<arguments:> none
=item B<return value:> none
=back
Resume the polling process
=head2 _shutdown
( run in 1.914 second using v1.01-cache-2.11-cpan-a49fcb8fa48 )