-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathSchedule.php
138 lines (114 loc) · 3.73 KB
/
Schedule.php
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
namespace EthanYehuda\CronjobManager\Model\Data;
use EthanYehuda\CronjobManager\Api\Data\ScheduleInterface;
use Magento\Framework\DataObject;
/**
* @codeCoverageIgnore
*/
class Schedule extends DataObject implements \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
const KEY_SCHEDULE_ID = 'schedule_id';
const KEY_JOB_CODE = 'job_code';
const KEY_STATUS = 'status';
const KEY_PID = 'pid';
const KEY_MESSAGES = 'messages';
const KEY_CREATED_AT = 'created_at';
const KEY_SCHEDULED_AT = 'scheduled_at';
const KEY_EXECUTED_AT = 'executed_at';
const KEY_FINISHED_AT = 'finished_at';
const KEY_KILL_REQUEST = 'kill_request';
public function __construct(array $data = [])
{
parent::__construct($data);
}
public function getScheduleId(): int
{
return (int) $this->getData(self::KEY_SCHEDULE_ID);
}
public function getJobCode(): string
{
return $this->getData(self::KEY_JOB_CODE);
}
public function getStatus(): string
{
return $this->getData(self::KEY_STATUS);
}
public function getPid()
{
return (int) $this->getData(self::KEY_PID);
}
public function getMessages()
{
return $this->getData(self::KEY_MESSAGES);
}
public function getCreatedAt()
{
return $this->getData(self::KEY_CREATED_AT);
}
public function getScheduledAt()
{
return $this->getData(self::KEY_SCHEDULED_AT);
}
public function getExecutedAt()
{
return $this->getData(self::KEY_EXECUTED_AT);
}
public function getFinishedAt()
{
return $this->getData(self::KEY_FINISHED_AT);
}
public function getKillRequest()
{
return $this->getData(self::KEY_KILL_REQUEST);
}
public function setScheduleId(int $scheduleId): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_SCHEDULE_ID, $scheduleId);
return $this;
}
public function setJobCode(string $jobCode): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_JOB_CODE, $jobCode);
return $this;
}
public function setStatus(string $status): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_STATUS, $status);
return $this;
}
public function setPid(int $pid): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_PID, $pid);
return $this;
}
public function setMessages(string $messages): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_MESSAGES, $messages);
return $this;
}
public function setCreatedAt(string $createdAt): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_CREATED_AT, $createdAt);
return $this;
}
public function setScheduledAt(string $scheduledAt): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_SCHEDULED_AT, $scheduledAt);
return $this;
}
public function setKillRequest(string $killRequest): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_KILL_REQUEST, $killRequest);
return $this;
}
public function setExecutedAt(string $executedAt): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_EXECUTED_AT, $executedAt);
return $this;
}
public function setFinishedAt(string $finishedAt): \EthanYehuda\CronjobManager\Api\Data\ScheduleInterface
{
$this->setData(self::KEY_FINISHED_AT, $finishedAt);
return $this;
}
}