1Minion::Iterator(3) User Contributed Perl Documentation Minion::Iterator(3)
2
3
4
6 Minion::Iterator - Minion iterator
7
9 use Minion::Iterator;
10
11 my $iter = Minion::Iterator->new(
12 minion => $minion, options => {states => ['inactive']});
13
15 Minion::Iterator is an iterator for Minion listing methods. Note that
16 this module is EXPERIMENTAL and might change without warning!
17
19 Minion::Iterator implements the following attributes.
20
21 fetch
22 my $fetch = $iter->fetch;
23 $iter = $iter->fetch(2);
24
25 Number of results to cache, defaults to 10.
26
27 minion
28 my $minion = $iter->minion;
29 $iter = $iter->minion(Minion->new);
30
31 Minion object this job belongs to.
32
33 options
34 my $options = $iter->options;
35 $iter = $iter->options({states => ['inactive']});
36
37 Options to be passed to "list_jobs" in Minion::Backend or
38 "list_workers" in Minion::Backend.
39
41 Minion::Iterator inherits all methods from Mojo::Base and implements
42 the following new ones.
43
44 next
45 my $value = $iter->next;
46
47 Get next value.
48
49 total
50 my $num = $iter->total;
51
52 Total number of results. If results are removed in the backend while
53 iterating, this number will become an estimate that gets updated every
54 time new results are fetched.
55
57 Minion, Mojolicious::Guides, <https://mojolicious.org>.
58
59
60
61perl v5.30.1 2020-02-02 Minion::Iterator(3)