403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/export/run/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/yandex.market/lib/export/run/admin.php
<?php

namespace Yandex\Market\Export\Run;

use Yandex\Market;

class Admin
{
	public static function progress($setupId)
	{
		Market\Config::setOption('setup_run_mtime_' . (int)$setupId, time());
	}

	public static function release($setupId)
	{
		Market\Config::removeOption('setup_run_mtime_' . (int)$setupId);
	}

	public static function getProgressTime($setupId)
	{
		$option = (int)Market\Config::getOption('setup_run_mtime_' . (int)$setupId);

		return ($option > 0 ? $option : null);
	}

	public static function hasProgress($setupId)
	{
		$progressTime = static::getProgressTime($setupId);

		return ($progressTime !== null);
	}

	public static function isProgressExpired($setupId)
	{
		$result = false;
		$progressTime = static::getProgressTime($setupId);

		if ($progressTime !== null && time() - $progressTime > static::getExpirePeriod())
		{
			$result = true;
		}

		return $result;
	}

	public static function getTimeLimit()
	{
		return (int)Market\Config::getOption('setup_run_time_limit', 30);
	}

	public static function setTimeLimit($seconds)
	{
		$seconds = (int)$seconds;

		if ($seconds > 0)
		{
			Market\Config::setOption('setup_run_time_limit', $seconds);
		}
	}

	public static function getTimeSleep()
	{
		return (int)Market\Config::getOption('setup_run_time_sleep', 3);
	}

	public static function setTimeSleep($seconds)
	{
		$seconds = (int)$seconds;

		if ($seconds > 0)
		{
			Market\Config::setOption('setup_run_time_sleep', $seconds);
		}
	}

	protected static function getExpirePeriod()
	{
		return static::getTimeLimit() * 2 + static::getTimeSleep();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit