if ($connection->isAlive() === true) { return $connection; } if ($this->readyToRevive($connection) === true) { return $connection; } } throw new NoNodesAvailableException("No alive nodes found in your cluster"); } public function scheduleCheck(): void { } private function readyToRevive(Connection $connection): bool { $timeout = min(
/** * Returns a single connection from the connection pool * Potentially performs a sniffing step before returning */ public function getConnection(): ConnectionInterface { return $this->connectionPool->nextConnection(); } /** * Perform a request to the Cluster * * @param string $method HTTP method to use
* * @throws Common\Exceptions\NoNodesAvailableException|\Exception */ public function performRequest(string $method, string $uri, array $params = [], $body = null, array $options = []): FutureArrayInterface { try { $connection = $this->getConnection(); } catch (Exceptions\NoNodesAvailableException $exception) { $this->log->critical('No alive nodes found in cluster'); throw $exception; } $response = [];
$shouldRetry = $transport->shouldRetry($request); $shouldRetryText = ($shouldRetry) ? 'true' : 'false'; $this->log->warning("Retries left? $shouldRetryText"); if ($shouldRetry && !$neverRetry) { return $transport->performRequest( $request['http_method'], $request['uri'], [], $request['body'], $options ); }
{ if (null === $onFulfilled) { return $this; } try { return resolve($onFulfilled($this->value)); } catch (\Throwable $exception) { return new RejectedPromise($exception); } catch (\Exception $exception) { return new RejectedPromise($exception); } }
*/ public function then( callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null ) { return $this->promise()->then($onFulfilled, $onRejected, $onProgress); } }
FutureArrayInterface $future, callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null ) { return new FutureArray( $future->then($onFulfilled, $onRejected, $onProgress), [$future, 'wait'], [$future, 'cancel'] ); } /**
// No error, deserialize $response['body'] = $this->serializer->deserialize($response['body'], $response['transfer_stats']); } $this->logRequestSuccess($request, $response); return isset($request['client']['verbose']) && $request['client']['verbose'] === true ? $response : $response['body']; } ); return $response; }; }
// RingPHP does not like if client is empty if (empty($request['client'])) { unset($request['client']); } $handler = $this->handler; $future = $handler($request, $this, $transport, $options); return $future; } public function getTransportSchema(): string {
$response = []; $caughtException = null; $this->lastConnection = $connection; $future = $connection->performRequest( $method, $uri, $params, $body, $options, $this );
{ $promise = $this->transport->performRequest( $endpoint->getMethod(), $endpoint->getURI(), $endpoint->getParams(), $endpoint->getBody(), $endpoint->getOptions() ); return $this->transport->resultOrFuture($promise, $endpoint->getOptions()); } }
$endpoint = $endpointBuilder('Search'); $endpoint->setParams($params); $endpoint->setIndex($index); $endpoint->setType($type); $endpoint->setBody($body); return $this->performRequest($endpoint); } /** * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. * * $params['index'] = (list) Comma-separated list of data streams, indices, or aliases to search * $params['field'] = (string) Field containing geospatial data to return
'size' => self::DEFAULT_SIZE_RECORD_AGGS_GROUP ] ]; $sections = []; $aggregation = []; $result = $client->search($query); foreach ($result['aggregations']['sections']['buckets'] as $bucket) { $sections[(int) $bucket['key']] = $bucket; } if ($sections) {
} else { $currentCache->startDataCache(); $arResult["SECTIONS"] = []; $aggregatedSections = []; if ($arParams['IBLOCK_ID']) { $aggregatedSections = NewFacetFilterBuilder::aggregateSections($arParams['IBLOCK_ID']); } foreach ($aggregatedSections as $sectionId => $section) { $arResult["SECTIONS"][] = [ 'NAME' => _l($section['data']['NAME'], 'iblock'), 'ELEMENT_CNT' => $section['doc_count'],
{ $parentComponentName = ""; $parentComponentPath = ""; $parentComponentTemplate = ""; } return include($_SERVER["DOCUMENT_ROOT"].$this->__path."/component.php"); } /** * Function executes the component. Returns the result of it's execution. * * <p>Note: component must be inited by initComponent method.</p> * @param string $componentTemplate
{ $this->__IncludeComponent(); $result = $this->arResult; } else { $result = $this->__IncludeComponent(); } $frameMode = $this->getFrameMode(); $componentFrame->end(); }
if (($arParams['AJAX_MODE'] ?? '') == 'Y') { $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent); } $this->__componentStack[] = $component; $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult); array_pop($this->__componentStack); } if ($bDrawIcons) {
["HIDE_ICONS" => "Y", "ACTIVE_COMPONENT" => "Y"] ); ?> <?php endif; ?> <?php $this->SetViewTarget("smartFilter"); ?> <?php if (empty($arTags)): ?> <?php $APPLICATION->IncludeComponent( "dresscode:catalog.section.list.elastic", "level2", [ "IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "SECTION_ID" => $arCurSection["ID"], "SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"],
include($_SERVER["DOCUMENT_ROOT"].$this->__fileAlt); return null; } $templateData = false; include($_SERVER["DOCUMENT_ROOT"].$this->__file); for ($i = count($this->frames) - 1; $i >= 0; $i--) { $frame = $this->frames[$i]; if ($frame->isStarted() && !$frame->isEnded()) {
$parentTemplateFolder, $this ); } else { $result = $this->__IncludePHPTemplate($arResult, $arParams, $parentTemplateFolder); } return $result; } /**
final public function showComponentTemplate() { if (!$this->__bInited) return null; if ($this->__template) $this->__template->includeTemplate($this->arResult); if(is_array($this->arResultCacheKeys)) { $arNewResult = array(); foreach($this->arResultCacheKeys as $key) if(array_key_exists($key, $this->arResult))
{ if (!$this->__bInited) return null; if ($this->initComponentTemplate($templatePage, $this->getSiteTemplateId(), $customTemplatePath)) { $this->showComponentTemplate(); if($this->__component_epilog) $this->includeComponentEpilog($this->__component_epilog); } else { $this->abortResultCache();
break; default: break; } } $this->IncludeComponentTemplate($componentPage);
{ $parentComponentName = ""; $parentComponentPath = ""; $parentComponentTemplate = ""; } return include($_SERVER["DOCUMENT_ROOT"].$this->__path."/component.php"); } /** * Function executes the component. Returns the result of it's execution. * * <p>Note: component must be inited by initComponent method.</p> * @param string $componentTemplate
{ $this->__IncludeComponent(); $result = $this->arResult; } else { $result = $this->__IncludeComponent(); } $frameMode = $this->getFrameMode(); $componentFrame->end(); }
if (($arParams['AJAX_MODE'] ?? '') == 'Y') { $obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent); } $this->__componentStack[] = $component; $result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult); array_pop($this->__componentStack); } if ($bDrawIcons) {
"USE_PRICE_COUNT" => "N", "USE_PRODUCT_QUANTITY" => "Y", "USE_REVIEW" => "Y", "USE_SALE_BESTSELLERS" => "Y", "USE_STORE" => "Y", "USE_STORE_PHONE" => "Y", "USE_STORE_SCHEDULE" => "Y" ) );?><br> <?php $APPLICATION->IncludeComponent("ecc:cart.assets",".default"); if ($_REQUEST['debug'] == 'Y') {
else { header($_SERVER["SERVER_PROTOCOL"]." 200 OK"); } $_SERVER["REAL_FILE_PATH"] = $url; include_once($io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'].$url)); die(); } } } //admin section 404
<? include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php'); if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php')) include_once($_SERVER['DOCUMENT_ROOT'].'/404.php'); ?>
$_SESSION = [ 'SESS_AUTH' => [ 'POLICY' => [ 'SESSION_TIMEOUT' => 24, 'SESSION_IP_MASK' => '0.0.0.0', 'MAX_STORE_NUM' => 10, 'STORE_IP_MASK' => '0.0.0.0', 'STORE_TIMEOUT' => 525600, 'CHECKWORD_TIMEOUT' => 2880, 'PASSWORD_LENGTH' => '8', 'PASSWORD_UPPERCASE' => 'Y', 'PASSWORD_LOWERCASE' => 'Y', 'PASSWORD_DIGITS' => 'N', 'PASSWORD_PUNCTUATION' => 'N', 'PASSWORD_CHECK_WEAK' => 'N', 'PASSWORD_CHECK_POLICY' => 'N', 'PASSWORD_CHANGE_DAYS' => 0, 'PASSWORD_UNIQUE_COUNT' => 0, 'LOGIN_ATTEMPTS' => 0, 'BLOCK_LOGIN_ATTEMPTS' => 0, 'BLOCK_TIME' => 0, ], ], 'SESS_IP' => '34.230.84.106', 'SESS_TIME' => 1710853757, 'IS_EXPIRED' => null, 'BX_SESSION_SIGN' => '7a657c0101c5099c32a534cb84606746', 'fixed_session_id' => 'eba9c981ab8daaed13a92fe7a954a032', 'BITRIX_CONVERSION_CONTEXT_s1' => [ 'ID' => null, 'EXPIRE' => 1710874740, 'UNIQUE' => [], ], 'SESS_SHOW_INCLUDE_TIME_EXEC' => null, 'BX_LOGIN_NEED_CAPTCHA_LOGIN' => [ 'LOGIN' => '', 'POLICY_ATTEMPTS' => 0, ], 'USER_GEO_POSITION' => [ 'locationID' => '47602', 'latitude' => '0.000000', 'longitude' => '0.000000', 'country' => 'Республика Казахстан', 'region' => '', 'city' => 'г.Алматы', 'zoom' => '', ], 'LOCAL_REDIRECTS' => [ 'C' => 0, 'R' => '', ], ];