Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
cleanagent.php
1<?php
2
4
6
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 ];
25
26
27 return self::getAgentName();
28 }
29
33 private static function getAgentName(): string
34 {
35 return static::class . "::execute();";
36 }
37}
static createFromTimestamp($timestamp)
Definition datetime.php:246