• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/agent/duplicate/volatile/cleaner.php
  • Класс: Bitrix\Crm\Agent\Duplicate\Volatile\Cleaner
  • Вызов: Cleaner::onRunning
protected function onRunning(array $progressData): bool
{
	if (!$this->checkStepInterval($progressData))
	{
		return false;
	}

	$timeToProcess = (int)floor(static::STEP_TTL * static::STEP_RATIO);
	$startTime = $this->getTimeStamp();
	$endTime = $startTime;
	$isFinal = false;

	while (!$isFinal && $endTime - $startTime <= $timeToProcess)
	{
		if(!$this->processStep())
		{
			$progressData['PROGRESS_VARS']['ACTIVE'] = 'N';

			$timestamp = $this->getTimeStamp();
			$progressData['STATUS'] = static::STATUS_FINISHED;
			$progressData['TIMESTAMP_FINISH'] = $timestamp;
			$progressData['TIMESTAMP'] = $timestamp;
			unset($timestamp);
			$this->setProgressData($progressData);

			$this->setAgentResult(false);

			$isFinal = true;
		}

		$endTime = $this->getTimeStamp();
	}

	return false;
}