добавлена дата создания в MQResponse
This commit is contained in:
1 parent
ed4b0fc73d
commit
85bea9433d
2 files changed
+27
No files matched your search
@@ -429,6 +429,17 @@
|
||||
$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 . ';');
|
||||
}
|
||||
/**
|
||||
* Массовое создание заданий
|
||||
*
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
*/
|
||||
private $taskId = 0;
|
||||
|
||||
/**
|
||||
* @var ?string $dateCreated Дата создания
|
||||
*/
|
||||
private $dateCreated = null;
|
||||
|
||||
/**
|
||||
* @var string $status Статус задания
|
||||
*/
|
||||
@@ -70,6 +75,7 @@
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->dateCreated = date(MQ::DATETIME_FORMAT);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,6 +134,16 @@
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получение даты создания задания
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDateCreated(): ?string
|
||||
{
|
||||
return $this->dateCreated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получение параметров
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user