Fix inconsistency between automation run and run log statuses

[MAILPOET-5568]
This commit is contained in:
Jan Jakes
2023-08-31 14:49:17 +02:00
committed by Aschepikov
parent d7addd8e55
commit d8afb42d89
4 changed files with 7 additions and 8 deletions

View File

@@ -8,10 +8,9 @@ use MailPoet\Automation\Engine\Utils\Json;
use Throwable;
class AutomationRunLog {
const STATUS_RUNNING = 'running';
const STATUS_COMPLETED = 'completed';
const STATUS_FAILED = 'failed';
public const STATUS_RUNNING = 'running';
public const STATUS_COMPLETE = 'complete';
public const STATUS_FAILED = 'failed';
/** @var int */
private $id;
@@ -113,7 +112,7 @@ class AutomationRunLog {
}
public function markCompletedSuccessfully(): void {
$this->status = self::STATUS_COMPLETED;
$this->status = self::STATUS_COMPLETE;
$this->completedAt = new DateTimeImmutable();
}