[+] mq сласс задач
This commit is contained in:
1 parent
4d5c443c22
commit
baef44668e
2 files changed
+15
-2
No files matched your search
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Core;
|
||||||
|
|
||||||
|
use Core\Helpers\SystemFunctions;
|
||||||
|
|
||||||
|
class MQTasks
|
||||||
|
{
|
||||||
|
public static function testSendTelegram()
|
||||||
|
{
|
||||||
|
SystemFunctions::sendTelegram('test task was completed');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
return $this->DB->getItems(
|
return $this->DB->getItems(
|
||||||
self::TABLE, [
|
self::TABLE, [
|
||||||
'active' => self::VALUE_Y,
|
'active' => self::VALUE_Y,
|
||||||
'in_progres' => self::VALUE_N,
|
'in_progress' => self::VALUE_N,
|
||||||
'executed' => self::VALUE_N,
|
'executed' => self::VALUE_N,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
*
|
*
|
||||||
* @return int|null Идентификатор созданного задания
|
* @return int|null Идентификатор созданного задания
|
||||||
*/
|
*/
|
||||||
public function addTask(string $class, string $method, ?array $params = null): ?int
|
public function createTask(string $class, string $method, ?array $params = null): ?int
|
||||||
{
|
{
|
||||||
if (empty($params)) {
|
if (empty($params)) {
|
||||||
$params = [];
|
$params = [];
|
||||||
|
|||||||
Reference in new issue
Block a user