добавлена дата создания в MQResponse

This commit is contained in:
rsgrinko committed 2022-07-22 15:54:58 +03:00
1 parent ed4b0fc73d
commit 85bea9433d
2 files changed
+27

No files matched your search

+11
View File
@@ -429,6 +429,17 @@
$this->DB->query('DELETE FROM ' . self::TABLE_HISTORY); $this->DB->query('DELETE FROM ' . self::TABLE_HISTORY);
} }
/**
* Полная очистка диспетчера очереди с остановкой воркеров
*
* @return void
* @throws CoreException
*/
public function flush(): void
{
$this->stopAllWorkers();
$this->DB->query('TRUNCATE ' . self::TABLE . '; TRUNCATE ' . self::TABLE_HISTORY . ';');
}
/** /**
* Массовое создание заданий * Массовое создание заданий
* *
+16
View File
@@ -40,6 +40,11 @@
*/ */
private $taskId = 0; private $taskId = 0;
/**
* @var ?string $dateCreated Дата создания
*/
private $dateCreated = null;
/** /**
* @var string $status Статус задания * @var string $status Статус задания
*/ */
@@ -70,6 +75,7 @@
*/ */
public function __construct() public function __construct()
{ {
$this->dateCreated = date(MQ::DATETIME_FORMAT);
} }
/** /**
@@ -128,6 +134,16 @@
return $this->status; return $this->status;
} }
/**
* Получение даты создания задания
*
* @return string|null
*/
public function getDateCreated(): ?string
{
return $this->dateCreated;
}
/** /**
* Получение параметров * Получение параметров
* *