1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use PhantomData;
use Pool;
pub use PreparedFlowJob;
pub use ;
/**
Represents a queue of jobs of the same kind.
It contains jobs in multiple sets (technically multiple different data structures).
- **Waiting**: jobs to be picked up by a worker. Jobs are ordered, but you can push
jobs to the front.
- **Active**: jobs being actively worked
- **Completed**: jobs that succeeded and have a return value
- **Delayed**: jobs that are scheduled for a later point in time. This might include
jobs that failed and are scheduled for retrying. Once the time is reached, they
are moved to waiting.
- **Failed**: once jobs have exceeded their configures retry count, they will be put here.
- **Prioritized**: jobs with assigned priority, but a job with a priority has always lower priority
than a job without priority (waiting set).
- **Waiting children**: those jobs are waiting, until all their children are completed.
- **Paused**: this is a special set, where all jobs are put, if the queue is paused.
A queue has two generics. `D` is the type of the Data or Payload and
has to implement [serde::Serialize] to be enqueuable.
`R` is the type of the Result, which has to implement [serde::Deserialize]
to be retrieved.
*/