Skip to content

Commit 5f65f4e

Browse files
authored
Merge pull request #48 from UrosPurtic/master
Add status 10 to tasker Consts
2 parents acddaed + 2ee687d commit 5f65f4e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Consts.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Consts
1212
const STATUS_DONE = 2;
1313
const STATUS_COMPLETED_NOT_DONE = 6;
1414
const STATUS_WAITING_FOR_RETRY = 7;
15+
const STATUS_SENT_TO_QUEUE_FOR_EXECUTION = 10;
1516

1617
const PRIORITY_LOW = 11;
1718
const PRIORITY_MEDIUM = 41;

src/Tasker2/Manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace G4\Tasker\Tasker2;
44

5+
use G4\Tasker\Consts;
56
use G4\Tasker\Tasker2\Exception\RabbitmqNotAvailableException;
67
use G4\Tasker\Tasker2\Queue\BatchPublisher;
78
use PhpAmqpLib\Connection\AMQPStreamConnection;
@@ -116,8 +117,7 @@ private function updateStatus()
116117
if (count($this->tasks) === 0) {
117118
return $this;
118119
}
119-
// update status sent to queue for execution
120-
$this->taskRepository->updateStatus(10, ...$this->tasks);
120+
$this->taskRepository->updateStatus(Consts::STATUS_SENT_TO_QUEUE_FOR_EXECUTION, ...$this->tasks);
121121
return $this;
122122
}
123123
}

0 commit comments

Comments
 (0)