Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
segmentdataclearjob.php
1
<?php
9
namespace
Bitrix\Sender\Runtime
;
10
11
use
Bitrix\Main\Type\DateTime
;
12
17
class
SegmentDataClearJob
extends
Job
18
{
26
public
static
function
addEventAgent
(
int
$groupId)
27
{
28
(
new
SegmentDataClearJob
())->
addAgent
(
29
static::getAgentName($groupId),
30
5,
31
(
new
DateTime
())->add(
'+5 seconds'
)
32
);
33
}
34
42
public
static
function
removeAgentFromDB
(
int
$groupId)
43
{
44
(
new
SegmentDataBuilderJob
())->
removeAgent
(
45
static::getAgentName($groupId)
46
);
47
}
48
56
public
static
function
existsInDB
(
int
$groupId): bool
57
{
58
return
(
new
SegmentDataBuilderJob
())->agentExists(
59
static::getAgentName($groupId)
60
);
61
}
62
70
public
static
function
getAgentName
(
int
$groupId)
71
{
72
return
"\Bitrix\Sender\SegmentDataTable::deleteByGroupId($groupId);"
;
73
}
74
}
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Sender\Runtime\Job
Definition
job.php:16
Bitrix\Sender\Runtime\Job\addAgent
addAgent($agentName, $interval=60, $nextDateExec='')
Definition
job.php:50
Bitrix\Sender\Runtime\Job\removeAgent
removeAgent($agentName)
Definition
job.php:69
Bitrix\Sender\Runtime\SegmentDataBuilderJob
Definition
segmentdatabuilderjob.php:18
Bitrix\Sender\Runtime\SegmentDataClearJob
Definition
segmentdataclearjob.php:18
Bitrix\Sender\Runtime\SegmentDataClearJob\getAgentName
static getAgentName(int $groupId)
Definition
segmentdataclearjob.php:70
Bitrix\Sender\Runtime\SegmentDataClearJob\addEventAgent
static addEventAgent(int $groupId)
Definition
segmentdataclearjob.php:26
Bitrix\Sender\Runtime\SegmentDataClearJob\removeAgentFromDB
static removeAgentFromDB(int $groupId)
Definition
segmentdataclearjob.php:42
Bitrix\Sender\Runtime\SegmentDataClearJob\existsInDB
static existsInDB(int $groupId)
Definition
segmentdataclearjob.php:56
Bitrix\Sender\Runtime
Definition
env.php:9
modules
sender
lib
runtime
segmentdataclearjob.php
Создано системой
1.10.0