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\Queue\Jobs;
4
 
5
use Illuminate\Container\Container;
6
use Illuminate\Contracts\Queue\Job as JobContract;
7
 
8
class SyncJob extends Job implements JobContract
9
{
10
    /**
11
     * The class name of the job.
12
     *
13
     * @var string
14
     */
15
    protected $job;
16
 
17
    /**
18
     * The queue message data.
19
     *
20
     * @var string
21
     */
22
    protected $payload;
23
 
24
    /**
25
     * Create a new job instance.
26
     *
27
     * @param  \Illuminate\Container\Container  $container
28
     * @param  string  $payload
29
     * @param  string  $connectionName
30
     * @param  string  $queue
31
     * @return void
32
     */
33
    public function __construct(Container $container, $payload, $connectionName, $queue)
34
    {
35
        $this->queue = $queue;
36
        $this->payload = $payload;
37
        $this->container = $container;
38
        $this->connectionName = $connectionName;
39
    }
40
 
41
    /**
42
     * Release the job back into the queue after (n) seconds.
43
     *
44
     * @param  int  $delay
45
     * @return void
46
     */
47
    public function release($delay = 0)
48
    {
49
        parent::release($delay);
50
    }
51
 
52
    /**
53
     * Get the number of times the job has been attempted.
54
     *
55
     * @return int
56
     */
57
    public function attempts()
58
    {
59
        return 1;
60
    }
61
 
62
    /**
63
     * Get the job identifier.
64
     *
65
     * @return string
66
     */
67
    public function getJobId()
68
    {
69
        return '';
70
    }
71
 
72
    /**
73
     * Get the raw body string for the job.
74
     *
75
     * @return string
76
     */
77
    public function getRawBody()
78
    {
79
        return $this->payload;
80
    }
81
 
82
    /**
83
     * Get the name of the queue the job belongs to.
84
     *
85
     * @return string
86
     */
87
    public function getQueue()
88
    {
89
        return 'sync';
90
    }
91
}