Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
cleanagent.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Internals\EventService
;
4
5
use
Bitrix\Main\Type\DateTime
;
6
7
class
CleanAgent
8
{
9
private
const
TTL = 2*24*3600;
10
11
private
static
$processing =
false
;
12
13
public
static
function
execute
()
14
{
15
if
(self::$processing)
16
{
17
return
self::getAgentName();
18
}
19
20
$filter = [
21
'>PROCESSED'
=>
DateTime::createFromTimestamp
(0),
22
'<PROCESSED'
=>
DateTime::createFromTimestamp
(time() - self::TTL)
23
];
24
EventTable::deleteList
($filter);
25
26
27
return
self::getAgentName();
28
}
29
33
private
static
function
getAgentName(): string
34
{
35
return
static::class .
"::execute();"
;
36
}
37
}
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Main\Type\DateTime\createFromTimestamp
static createFromTimestamp($timestamp)
Definition
datetime.php:246
Bitrix\Socialnetwork\Internals\EventService\CleanAgent
Definition
cleanagent.php:8
Bitrix\Socialnetwork\Internals\EventService\CleanAgent\execute
static execute()
Definition
cleanagent.php:13
Bitrix\Socialnetwork\Internals\EventService\EventTable\deleteList
static deleteList(array $filter)
Definition
eventtable.php:159
Bitrix\Socialnetwork\Internals\EventService
Definition
cleanagent.php:3
modules
socialnetwork
lib
internals
eventservice
cleanagent.php
Создано системой
1.10.0