- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/sync/managers/pushwatchingmanager.php
- Класс: BitrixCalendarSyncManagersPushWatchingManager
- Вызов: PushWatchingManager::renewWatchChannels
static function renewWatchChannels()
{
if (!Loader::includeModule('dav') || !Loader::includeModule('calendar'))
{
return false;
}
$agentName = __METHOD__ . '();';
$manager = new static();
$status = $manager->doRenewWatchChannels();
$manager->doFixWatchSectionChannels();
$manager->doFixWatchConnectionChannels();
if ($status === self::RESULT_STATUS['done'])
{
$nextAgentDate = DateTime::createFromTimestamp(
time() + self::PAUSE_INTERVAL_CHANNEL)->format(Date::convertFormatToPhp(FORMAT_DATETIME)
);
CAgent::removeAgent($agentName, "calendar");
CAgent::addAgent($agentName, "calendar", "N", self::RENEW_INTERVAL_CHANNEL,"", "Y", $nextAgentDate);
return false;
}
return $agentName;
}