uawdijnntqw1x1x1
IP : 13.58.76.154
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
kirov.axolotls.ru
/
bitrix
/
modules
/
imopenlines
/
lib
/
log
/
execlog.php
/
/
<?php namespace Bitrix\ImOpenLines\Log; use Bitrix\Imopenlines\Model\ExecLogTable; use Bitrix\Main\Type\DateTime; class ExecLog { /** * @param string $execFunction * @param bool $isSuccess * * @return \Bitrix\Main\ORM\Data\AddResult|\Bitrix\Main\ORM\Data\UpdateResult * @throws \Bitrix\Main\ArgumentException * @throws \Bitrix\Main\ObjectException * @throws \Bitrix\Main\ObjectPropertyException * @throws \Bitrix\Main\SystemException */ public static function setExecFunction($execFunction, $isSuccess = true) { $execCollection = self::getExecByFunction($execFunction); $fields = array( 'LAST_EXEC_TIME' => new DateTime(), 'IS_SUCCESS' => $isSuccess ? 'Y' : 'N' ); if ($exec = $execCollection->Fetch()) { $result = ExecLogTable::update($exec['ID'], $fields); } else { $fields['EXEC_FUNCTION'] = $execFunction; $result = ExecLogTable::add($fields); } return $result; } /** * @param string $execFunction * * @return \Bitrix\Main\ORM\Query\Result * @throws \Bitrix\Main\ArgumentException * @throws \Bitrix\Main\ObjectPropertyException * @throws \Bitrix\Main\SystemException */ public static function getExecByFunction($execFunction) { $filter = array('=EXEC_FUNCTION' => $execFunction); $result = ExecLogTable::getList( array( 'order' => array('LAST_EXEC_TIME' => 'DESC'), 'filter' => $filter, 'limit' => 1, 'cache' => array( 'ttl' => 86400 ) ) ); return $result; } /** * Check that correct time of function exec has come * * @param $execFunction * @param int $execPeriod * * @return bool * @throws \Bitrix\Main\ArgumentException * @throws \Bitrix\Main\ObjectException * @throws \Bitrix\Main\ObjectPropertyException * @throws \Bitrix\Main\SystemException */ public static function isTimeToExec($execFunction, $execPeriod = 86400) { $result = true; $exec = self::getExecByFunction($execFunction)->Fetch(); if (!empty($exec['LAST_EXEC_TIME'])) { $datetime = new DateTime($exec['LAST_EXEC_TIME']); $result = (time() - $datetime->getTimestamp() >= $execPeriod); } return $result; } }
/var/www/axolotl/data/www/kirov.axolotls.ru/bitrix/modules/imopenlines/lib/log/execlog.php