Base::tryContinue

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Base
  4. tryContinue
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/agent/duplicate/background/base.php
  • Класс: Bitrix\Crm\Agent\Duplicate\Background\Base
  • Вызов: Base::tryContinue
protected function tryContinue(): Result
{
	$result = new Result();

	$progressData = $this->getProgressData();

	if (
		!(
			isset($progressData['STATUS'])
			&& in_array(
				$progressData['STATUS'],
				[
					static::STATUS_PENDING_STOP,
					static::STATUS_STOPPED,
					static::STATUS_PENDING_CONTINUE,
				],
				true
			)
		)
	)
	{
		$result->addError($this->getErrorByCode(static::ERR_NOT_STOPPED));

		return $result;
	}

	$progressData['NEXT_STATUS'] = static::STATUS_PENDING_CONTINUE;
	$progressData['TIMESTAMP'] = time();
	$this->setProgressData($progressData);
	$this->activate();

	return $result;
}

Добавить комментарий