Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Bus;
4
 
5
class UpdatedBatchJobCounts
6
{
7
    /**
8
     * The number of pending jobs remaining for the batch.
9
     *
10
     * @var int
11
     */
12
    public $pendingJobs;
13
 
14
    /**
15
     * The number of failed jobs that belong to the batch.
16
     *
17
     * @var int
18
     */
19
    public $failedJobs;
20
 
21
    /**
22
     * Create a new batch job counts object.
23
     *
24
     * @param  int  $pendingJobs
25
     * @param  int  $failedJobs
26
     * @return void
27
     */
28
    public function __construct(int $pendingJobs = 0, int $failedJobs = 0)
29
    {
30
        $this->pendingJobs = $pendingJobs;
31
        $this->failedJobs = $failedJobs;
32
    }
33
 
34
    /**
35
     * Determine if all jobs have run exactly once.
36
     *
37
     * @return bool
38
     */
39
    public function allJobsHaveRanExactlyOnce()
40
    {
41
        return ($this->pendingJobs - $this->failedJobs) === 0;
42
    }
43
}