GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Minion::Iterator(3) User Contributed Perl Documentation Minion::Iterator(3)

Minion::Iterator - Minion iterator

  use Minion::Iterator;

  my $iter = Minion::Iterator->new(minion  => $minion, options => {states => ['inactive']});

Minion::Iterator is an iterator for Minion listing methods.

Minion::Iterator implements the following attributes.

  my $fetch = $iter->fetch;
  $iter     = $iter->fetch(2);

Number of results to cache, defaults to 10.

  my $minion = $iter->minion;
  $iter      = $iter->minion(Minion->new);

Minion object this job belongs to.

  my $options = $iter->options;
  $iter       = $iter->options({states => ['inactive']});

Options to be passed to "list_jobs" in Minion::Backend or "list_workers" in Minion::Backend.

Minion::Iterator inherits all methods from Mojo::Base and implements the following new ones.

  $iter->each(sub {...});

Evaluate callback for each element in collection. The element will be the first argument passed to the callback, and is also available as $_.

  my $value = $iter->next;

Get next value.

  my $num = $iter->total;

Total number of results. If results are removed in the backend while iterating, this number will become an estimate that gets updated every time new results are fetched.

Minion, Minion::Guide, <https://minion.pm>, Mojolicious::Guides, <https://mojolicious.org>.
2022-01-20 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.