From f7ce890b33d6496f48157324442079917e54bd2f Mon Sep 17 00:00:00 2001 From: Dan Feder Date: Fri, 17 Nov 2023 10:48:50 -0500 Subject: [PATCH] Add "waiting" result status (#20) --- src/Result.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Result.php b/src/Result.php index b8cb1ce..48e2c94 100644 --- a/src/Result.php +++ b/src/Result.php @@ -8,18 +8,19 @@ class Result implements HydratableInterface { use HydratableTrait; + public const WAITING = 'waiting'; public const STOPPED = 'stopped'; public const IN_PROGRESS = 'in_progress'; public const ERROR = 'error'; public const DONE = 'done'; - private $status = self::STOPPED; + private $status = self::WAITING; private string $data = ""; private string $error = ""; public function setStatus($status) { - $statuss = [self::STOPPED, self::IN_PROGRESS, self::ERROR, self::DONE]; + $statuss = [self::WAITING, self::STOPPED, self::IN_PROGRESS, self::ERROR, self::DONE]; if (in_array($status, $statuss)) { $this->status = $status; } else {