PluginProbe ʕ •ᴥ•ʔ
Transferito: WP Migration / trunk
Transferito: WP Migration vtrunk
trunk 11.4.0 12.0.0 13.1.0 14.0.0 14.0.11 14.0.7 14.1.0 14.1.1 14.1.2 14.1.3 14.1.4
transferito / vendor / aws / aws-sdk-php / src / RetryMiddlewareV2.php
transferito / vendor / aws / aws-sdk-php / src Last commit date
ACMPCA 11 months ago ARCZonalShift 11 months ago AccessAnalyzer 11 months ago Account 11 months ago Acm 11 months ago AlexaForBusiness 11 months ago Amplify 11 months ago AmplifyBackend 11 months ago AmplifyUIBuilder 11 months ago Api 11 months ago ApiGateway 11 months ago ApiGatewayManagementApi 11 months ago ApiGatewayV2 11 months ago AppConfig 11 months ago AppConfigData 11 months ago AppFabric 11 months ago AppIntegrationsService 11 months ago AppMesh 11 months ago AppRegistry 11 months ago AppRunner 11 months ago AppSync 11 months ago Appflow 11 months ago ApplicationAutoScaling 11 months ago ApplicationCostProfiler 11 months ago ApplicationDiscoveryService 11 months ago ApplicationInsights 11 months ago Appstream 11 months ago Arn 11 months ago Athena 11 months ago AuditManager 11 months ago AugmentedAIRuntime 11 months ago AutoScaling 11 months ago AutoScalingPlans 11 months ago B2bi 11 months ago BCMDataExports 11 months ago Backup 11 months ago BackupGateway 11 months ago BackupStorage 11 months ago Batch 11 months ago Bedrock 11 months ago BedrockAgent 11 months ago BedrockAgentRuntime 11 months ago BedrockRuntime 11 months ago BillingConductor 11 months ago Braket 11 months ago Budgets 11 months ago Chime 11 months ago ChimeSDKIdentity 11 months ago ChimeSDKMediaPipelines 11 months ago ChimeSDKMeetings 11 months ago ChimeSDKMessaging 11 months ago ChimeSDKVoice 11 months ago CleanRooms 11 months ago CleanRoomsML 11 months ago ClientSideMonitoring 11 months ago Cloud9 11 months ago CloudControlApi 11 months ago CloudDirectory 11 months ago CloudFormation 11 months ago CloudFront 11 months ago CloudFrontKeyValueStore 11 months ago CloudHSMV2 11 months ago CloudHsm 11 months ago CloudSearch 11 months ago CloudSearchDomain 11 months ago CloudTrail 11 months ago CloudTrailData 11 months ago CloudWatch 11 months ago CloudWatchEvents 11 months ago CloudWatchEvidently 11 months ago CloudWatchLogs 11 months ago CloudWatchRUM 11 months ago CodeArtifact 11 months ago CodeBuild 11 months ago CodeCatalyst 11 months ago CodeCommit 11 months ago CodeDeploy 11 months ago CodeGuruProfiler 11 months ago CodeGuruReviewer 11 months ago CodeGuruSecurity 11 months ago CodePipeline 11 months ago CodeStar 11 months ago CodeStarNotifications 11 months ago CodeStarconnections 11 months ago CognitoIdentity 11 months ago CognitoIdentityProvider 11 months ago CognitoSync 11 months ago Comprehend 11 months ago ComprehendMedical 11 months ago ComputeOptimizer 11 months ago ConfigService 11 months ago Configuration 11 months ago Connect 11 months ago ConnectCampaignService 11 months ago ConnectCases 11 months ago ConnectContactLens 11 months ago ConnectParticipant 11 months ago ConnectWisdomService 11 months ago ControlTower 11 months ago CostExplorer 11 months ago CostOptimizationHub 11 months ago CostandUsageReportService 11 months ago Credentials 11 months ago Crypto 11 months ago CustomerProfiles 11 months ago DAX 11 months ago DLM 11 months ago DataExchange 11 months ago DataPipeline 11 months ago DataSync 11 months ago DataZone 11 months ago DatabaseMigrationService 11 months ago DefaultsMode 11 months ago Detective 11 months ago DevOpsGuru 11 months ago DeviceFarm 11 months ago DirectConnect 11 months ago DirectoryService 11 months ago DocDB 11 months ago DocDBElastic 11 months ago DynamoDb 11 months ago DynamoDbStreams 11 months ago EBS 11 months ago EC2InstanceConnect 11 months ago ECRPublic 11 months ago EKS 11 months ago EKSAuth 11 months ago EMRContainers 11 months ago EMRServerless 11 months ago Ec2 11 months ago Ecr 11 months ago Ecs 11 months ago Efs 11 months ago ElastiCache 11 months ago ElasticBeanstalk 11 months ago ElasticInference 11 months ago ElasticLoadBalancing 11 months ago ElasticLoadBalancingV2 11 months ago ElasticTranscoder 11 months ago ElasticsearchService 11 months ago Emr 11 months ago Endpoint 11 months ago EndpointDiscovery 11 months ago EndpointV2 11 months ago EntityResolution 11 months ago EventBridge 11 months ago Exception 11 months ago FIS 11 months ago FMS 11 months ago FSx 11 months ago FinSpaceData 11 months ago Firehose 11 months ago ForecastQueryService 11 months ago ForecastService 11 months ago FraudDetector 11 months ago FreeTier 11 months ago GameLift 11 months ago Glacier 11 months ago GlobalAccelerator 11 months ago Glue 11 months ago GlueDataBrew 11 months ago Greengrass 11 months ago GreengrassV2 11 months ago GroundStation 11 months ago GuardDuty 11 months ago Handler 11 months ago Health 11 months ago HealthLake 11 months ago Honeycode 11 months ago IVS 11 months ago IVSRealTime 11 months ago Iam 11 months ago Identity 11 months ago IdentityStore 11 months ago ImportExport 11 months ago Inspector 11 months ago Inspector2 11 months ago InspectorScan 11 months ago InternetMonitor 11 months ago IoT1ClickDevicesService 11 months ago IoT1ClickProjects 11 months ago IoTAnalytics 11 months ago IoTDeviceAdvisor 11 months ago IoTEvents 11 months ago IoTEventsData 11 months ago IoTFleetHub 11 months ago IoTFleetWise 11 months ago IoTJobsDataPlane 11 months ago IoTRoboRunner 11 months ago IoTSecureTunneling 11 months ago IoTSiteWise 11 months ago IoTThingsGraph 11 months ago IoTTwinMaker 11 months ago IoTWireless 11 months ago Iot 11 months ago IotDataPlane 11 months ago Kafka 11 months ago KafkaConnect 11 months ago KendraRanking 11 months ago Keyspaces 11 months ago Kinesis 11 months ago KinesisAnalytics 11 months ago KinesisAnalyticsV2 11 months ago KinesisVideo 11 months ago KinesisVideoArchivedMedia 11 months ago KinesisVideoMedia 11 months ago KinesisVideoSignalingChannels 11 months ago KinesisVideoWebRTCStorage 11 months ago Kms 11 months ago LakeFormation 11 months ago Lambda 11 months ago LaunchWizard 11 months ago LexModelBuildingService 11 months ago LexModelsV2 11 months ago LexRuntimeService 11 months ago LexRuntimeV2 11 months ago LicenseManager 11 months ago LicenseManagerLinuxSubscriptions 11 months ago LicenseManagerUserSubscriptions 11 months ago Lightsail 11 months ago LocationService 11 months ago LookoutEquipment 11 months ago LookoutMetrics 11 months ago LookoutforVision 11 months ago MQ 11 months ago MTurk 11 months ago MWAA 11 months ago MachineLearning 11 months ago Macie2 11 months ago MainframeModernization 11 months ago ManagedBlockchain 11 months ago ManagedBlockchainQuery 11 months ago ManagedGrafana 11 months ago MarketplaceAgreement 11 months ago MarketplaceCatalog 11 months ago MarketplaceCommerceAnalytics 11 months ago MarketplaceDeployment 11 months ago MarketplaceEntitlementService 11 months ago MarketplaceMetering 11 months ago MediaConnect 11 months ago MediaConvert 11 months ago MediaLive 11 months ago MediaPackage 11 months ago MediaPackageV2 11 months ago MediaPackageVod 11 months ago MediaStore 11 months ago MediaStoreData 11 months ago MediaTailor 11 months ago MedicalImaging 11 months ago MemoryDB 11 months ago MigrationHub 11 months ago MigrationHubConfig 11 months ago MigrationHubOrchestrator 11 months ago MigrationHubRefactorSpaces 11 months ago MigrationHubStrategyRecommendations 11 months ago Mobile 11 months ago Multipart 11 months ago Neptune 11 months ago Neptunedata 11 months ago NetworkFirewall 11 months ago NetworkManager 11 months ago NimbleStudio 11 months ago OAM 11 months ago OSIS 11 months ago Omics 11 months ago OpenSearchServerless 11 months ago OpenSearchService 11 months ago OpsWorks 11 months ago OpsWorksCM 11 months ago Organizations 11 months ago Outposts 11 months ago PI 11 months ago Panorama 11 months ago PaymentCryptography 11 months ago PaymentCryptographyData 11 months ago PcaConnectorAd 11 months ago Personalize 11 months ago PersonalizeEvents 11 months ago PersonalizeRuntime 11 months ago Pinpoint 11 months ago PinpointEmail 11 months ago PinpointSMSVoice 11 months ago PinpointSMSVoiceV2 11 months ago Pipes 11 months ago Polly 11 months ago Pricing 11 months ago PrivateNetworks 11 months ago PrometheusService 11 months ago Proton 11 months ago QBusiness 11 months ago QConnect 11 months ago QLDB 11 months ago QLDBSession 11 months ago QuickSight 11 months ago RAM 11 months ago RDSDataService 11 months ago Rds 11 months ago RecycleBin 11 months ago Redshift 11 months ago RedshiftDataAPIService 11 months ago RedshiftServerless 11 months ago Rekognition 11 months ago Repostspace 11 months ago ResilienceHub 11 months ago ResourceExplorer2 11 months ago ResourceGroups 11 months ago ResourceGroupsTaggingAPI 11 months ago Retry 11 months ago RoboMaker 11 months ago RolesAnywhere 11 months ago Route53 11 months ago Route53Domains 11 months ago Route53RecoveryCluster 11 months ago Route53RecoveryControlConfig 11 months ago Route53RecoveryReadiness 11 months ago Route53Resolver 11 months ago S3 11 months ago S3Control 11 months ago S3Outposts 11 months ago SSMContacts 11 months ago SSMIncidents 11 months ago SSO 11 months ago SSOAdmin 11 months ago SSOOIDC 11 months ago SageMaker 11 months ago SageMakerFeatureStoreRuntime 11 months ago SageMakerGeospatial 11 months ago SageMakerMetrics 11 months ago SageMakerRuntime 11 months ago SagemakerEdgeManager 11 months ago SavingsPlans 11 months ago Scheduler 11 months ago Schemas 11 months ago Script 11 months ago SecretsManager 11 months ago SecurityHub 11 months ago SecurityLake 11 months ago ServerlessApplicationRepository 11 months ago ServiceCatalog 11 months ago ServiceDiscovery 11 months ago ServiceQuotas 11 months ago Ses 11 months ago SesV2 11 months ago Sfn 11 months ago Shield 11 months ago Signature 11 months ago SimSpaceWeaver 11 months ago Sms 11 months ago SnowBall 11 months ago SnowDeviceManagement 11 months ago Sns 11 months ago Sqs 11 months ago Ssm 11 months ago SsmSap 11 months ago StorageGateway 11 months ago Sts 11 months ago Support 11 months ago SupportApp 11 months ago Swf 11 months ago Synthetics 11 months ago Textract 11 months ago TimestreamQuery 11 months ago TimestreamWrite 11 months ago Tnb 11 months ago Token 11 months ago TranscribeService 11 months ago Transfer 11 months ago Translate 11 months ago TrustedAdvisor 11 months ago VPCLattice 11 months ago VerifiedPermissions 11 months ago VoiceID 11 months ago WAFV2 11 months ago Waf 11 months ago WafRegional 11 months ago WellArchitected 11 months ago WorkDocs 11 months ago WorkLink 11 months ago WorkMail 11 months ago WorkMailMessageFlow 11 months ago WorkSpaces 11 months ago WorkSpacesThinClient 11 months ago WorkSpacesWeb 11 months ago XRay 11 months ago data 11 months ago drs 11 months ago finspace 11 months ago imagebuilder 11 months ago ivschat 11 months ago kendra 11 months ago mgn 11 months ago signer 11 months ago AbstractConfigurationProvider.php 11 months ago AwsClient.php 11 months ago AwsClientInterface.php 11 months ago AwsClientTrait.php 11 months ago CacheInterface.php 11 months ago ClientResolver.php 11 months ago Command.php 11 months ago CommandInterface.php 11 months ago CommandPool.php 11 months ago ConfigurationProviderInterface.php 11 months ago DoctrineCacheAdapter.php 11 months ago EndpointParameterMiddleware.php 11 months ago HandlerList.php 11 months ago HasDataTrait.php 11 months ago HasMonitoringEventsTrait.php 11 months ago HashInterface.php 11 months ago HashingStream.php 11 months ago History.php 11 months ago IdempotencyTokenMiddleware.php 11 months ago InputValidationMiddleware.php 11 months ago JsonCompiler.php 11 months ago LruArrayCache.php 11 months ago Middleware.php 11 months ago MockHandler.php 11 months ago MonitoringEventsInterface.php 11 months ago MultiRegionClient.php 11 months ago PhpHash.php 11 months ago PresignUrlMiddleware.php 11 months ago Psr16CacheAdapter.php 11 months ago PsrCacheAdapter.php 11 months ago QueryCompatibleInputMiddleware.php 11 months ago RequestCompressionMiddleware.php 11 months ago ResponseContainerInterface.php 11 months ago Result.php 11 months ago ResultInterface.php 11 months ago ResultPaginator.php 11 months ago RetryMiddleware.php 11 months ago RetryMiddlewareV2.php 11 months ago Sdk.php 11 months ago StreamRequestPayloadMiddleware.php 11 months ago TraceMiddleware.php 11 months ago Waiter.php 11 months ago WrappedHttpHandler.php 11 months ago functions.php 11 months ago
RetryMiddlewareV2.php
378 lines
1 <?php
2 namespace Aws;
3
4 use Aws\Exception\AwsException;
5 use Aws\Retry\ConfigurationInterface;
6 use Aws\Retry\QuotaManager;
7 use Aws\Retry\RateLimiter;
8 use Aws\Retry\RetryHelperTrait;
9 use GuzzleHttp\Exception\RequestException;
10 use GuzzleHttp\Promise;
11 use Psr\Http\Message\RequestInterface;
12
13 /**
14 * Middleware that retries failures. V2 implementation that supports 'standard'
15 * and 'adaptive' modes.
16 *
17 * @internal
18 */
19 class RetryMiddlewareV2
20 {
21 use RetryHelperTrait;
22
23 private static $standardThrottlingErrors = [
24 'Throttling' => true,
25 'ThrottlingException' => true,
26 'ThrottledException' => true,
27 'RequestThrottledException' => true,
28 'TooManyRequestsException' => true,
29 'ProvisionedThroughputExceededException' => true,
30 'TransactionInProgressException' => true,
31 'RequestLimitExceeded' => true,
32 'BandwidthLimitExceeded' => true,
33 'LimitExceededException' => true,
34 'RequestThrottled' => true,
35 'SlowDown' => true,
36 'PriorRequestNotComplete' => true,
37 'EC2ThrottledException' => true,
38 ];
39
40 private static $standardTransientErrors = [
41 'RequestTimeout' => true,
42 'RequestTimeoutException' => true,
43 ];
44
45 private static $standardTransientStatusCodes = [
46 500 => true,
47 502 => true,
48 503 => true,
49 504 => true,
50 ];
51
52 private $collectStats;
53 private $decider;
54 private $delayer;
55 private $maxAttempts;
56 private $maxBackoff;
57 private $mode;
58 private $nextHandler;
59 private $options;
60 private $quotaManager;
61 private $rateLimiter;
62
63 public static function wrap($config, $options)
64 {
65 return function (callable $handler) use (
66 $config,
67 $options
68 ) {
69 return new static(
70 $config,
71 $handler,
72 $options
73 );
74 };
75 }
76
77 public static function createDefaultDecider(
78 QuotaManager $quotaManager,
79 $maxAttempts = 3,
80 $options = []
81 ) {
82 $retryCurlErrors = [];
83 if (extension_loaded('curl')) {
84 $retryCurlErrors[CURLE_RECV_ERROR] = true;
85 }
86
87 return function(
88 $attempts,
89 CommandInterface $command,
90 $result
91 ) use ($options, $quotaManager, $retryCurlErrors, $maxAttempts) {
92
93 // Release retry tokens back to quota on a successful result
94 $quotaManager->releaseToQuota($result);
95
96 // Allow command-level option to override this value
97 // # of attempts = # of retries + 1
98 $maxAttempts = (null !== $command['@retries'])
99 ? $command['@retries'] + 1
100 : $maxAttempts;
101
102 $isRetryable = self::isRetryable(
103 $result,
104 $retryCurlErrors,
105 $options
106 );
107
108 if ($isRetryable) {
109
110 // Retrieve retry tokens and check if quota has been exceeded
111 if (!$quotaManager->hasRetryQuota($result)) {
112 return false;
113 }
114
115 if ($attempts >= $maxAttempts) {
116 if (!empty($result) && $result instanceof AwsException) {
117 $result->setMaxRetriesExceeded();
118 }
119 return false;
120 }
121 }
122
123 return $isRetryable;
124 };
125 }
126
127 public function __construct(
128 ConfigurationInterface $config,
129 callable $handler,
130 $options = []
131 ) {
132 $this->options = $options;
133 $this->maxAttempts = $config->getMaxAttempts();
134 $this->mode = $config->getMode();
135 $this->nextHandler = $handler;
136 $this->quotaManager = new QuotaManager();
137
138 $this->maxBackoff = isset($options['max_backoff'])
139 ? $options['max_backoff']
140 : 20000;
141
142 $this->collectStats = isset($options['collect_stats'])
143 ? (bool) $options['collect_stats']
144 : false;
145
146 $this->decider = isset($options['decider'])
147 ? $options['decider']
148 : self::createDefaultDecider(
149 $this->quotaManager,
150 $this->maxAttempts,
151 $options
152 );
153
154 $this->delayer = isset($options['delayer'])
155 ? $options['delayer']
156 : function ($attempts) {
157 return $this->exponentialDelayWithJitter($attempts);
158 };
159
160 if ($this->mode === 'adaptive') {
161 $this->rateLimiter = isset($options['rate_limiter'])
162 ? $options['rate_limiter']
163 : new RateLimiter();
164 }
165 }
166
167 public function __invoke(CommandInterface $cmd, RequestInterface $req)
168 {
169 $decider = $this->decider;
170 $delayer = $this->delayer;
171 $handler = $this->nextHandler;
172
173 $attempts = 1;
174 $monitoringEvents = [];
175 $requestStats = [];
176
177 $req = $this->addRetryHeader($req, 0, 0);
178
179 $callback = function ($value) use (
180 $handler,
181 $cmd,
182 $req,
183 $decider,
184 $delayer,
185 &$attempts,
186 &$requestStats,
187 &$monitoringEvents,
188 &$callback
189 ) {
190 if ($this->mode === 'adaptive') {
191 $this->rateLimiter->updateSendingRate($this->isThrottlingError($value));
192 }
193
194 $this->updateHttpStats($value, $requestStats);
195
196 if ($value instanceof MonitoringEventsInterface) {
197 $reversedEvents = array_reverse($monitoringEvents);
198 $monitoringEvents = array_merge($monitoringEvents, $value->getMonitoringEvents());
199 foreach ($reversedEvents as $event) {
200 $value->prependMonitoringEvent($event);
201 }
202 }
203 if ($value instanceof \Exception || $value instanceof \Throwable) {
204 if (!$decider($attempts, $cmd, $value)) {
205 return Promise\Create::rejectionFor(
206 $this->bindStatsToReturn($value, $requestStats)
207 );
208 }
209 } elseif ($value instanceof ResultInterface
210 && !$decider($attempts, $cmd, $value)
211 ) {
212 return $this->bindStatsToReturn($value, $requestStats);
213 }
214
215 $delayBy = $delayer($attempts++);
216 $cmd['@http']['delay'] = $delayBy;
217 if ($this->collectStats) {
218 $this->updateStats($attempts - 1, $delayBy, $requestStats);
219 }
220
221 // Update retry header with retry count and delayBy
222 $req = $this->addRetryHeader($req, $attempts - 1, $delayBy);
223
224 // Get token from rate limiter, which will sleep if necessary
225 if ($this->mode === 'adaptive') {
226 $this->rateLimiter->getSendToken();
227 }
228
229 return $handler($cmd, $req)->then($callback, $callback);
230 };
231
232 // Get token from rate limiter, which will sleep if necessary
233 if ($this->mode === 'adaptive') {
234 $this->rateLimiter->getSendToken();
235 }
236
237 return $handler($cmd, $req)->then($callback, $callback);
238 }
239
240 /**
241 * Amount of milliseconds to delay as a function of attempt number
242 *
243 * @param $attempts
244 * @return mixed
245 */
246 public function exponentialDelayWithJitter($attempts)
247 {
248 $rand = mt_rand() / mt_getrandmax();
249 return min(1000 * $rand * pow(2, $attempts) , $this->maxBackoff);
250 }
251
252 private static function isRetryable(
253 $result,
254 $retryCurlErrors,
255 $options = []
256 ) {
257 $errorCodes = self::$standardThrottlingErrors + self::$standardTransientErrors;
258 if (!empty($options['transient_error_codes'])
259 && is_array($options['transient_error_codes'])
260 ) {
261 foreach($options['transient_error_codes'] as $code) {
262 $errorCodes[$code] = true;
263 }
264 }
265 if (!empty($options['throttling_error_codes'])
266 && is_array($options['throttling_error_codes'])
267 ) {
268 foreach($options['throttling_error_codes'] as $code) {
269 $errorCodes[$code] = true;
270 }
271 }
272
273 $statusCodes = self::$standardTransientStatusCodes;
274 if (!empty($options['status_codes'])
275 && is_array($options['status_codes'])
276 ) {
277 foreach($options['status_codes'] as $code) {
278 $statusCodes[$code] = true;
279 }
280 }
281
282 if (!empty($options['curl_errors'])
283 && is_array($options['curl_errors'])
284 ) {
285 foreach($options['curl_errors'] as $code) {
286 $retryCurlErrors[$code] = true;
287 }
288 }
289
290 if ($result instanceof \Exception || $result instanceof \Throwable) {
291 $isError = true;
292 } else {
293 $isError = false;
294 }
295
296 if (!$isError) {
297 if (!isset($result['@metadata']['statusCode'])) {
298 return false;
299 }
300 return isset($statusCodes[$result['@metadata']['statusCode']]);
301 }
302
303 if (!($result instanceof AwsException)) {
304 return false;
305 }
306
307 if ($result->isConnectionError()) {
308 return true;
309 }
310
311 if (!empty($errorCodes[$result->getAwsErrorCode()])) {
312 return true;
313 }
314
315 if (!empty($statusCodes[$result->getStatusCode()])) {
316 return true;
317 }
318
319 if (count($retryCurlErrors)
320 && ($previous = $result->getPrevious())
321 && $previous instanceof RequestException
322 ) {
323 if (method_exists($previous, 'getHandlerContext')) {
324 $context = $previous->getHandlerContext();
325 return !empty($context['errno'])
326 && isset($retryCurlErrors[$context['errno']]);
327 }
328
329 $message = $previous->getMessage();
330 foreach (array_keys($retryCurlErrors) as $curlError) {
331 if (strpos($message, 'cURL error ' . $curlError . ':') === 0) {
332 return true;
333 }
334 }
335 }
336
337 // Check error shape for the retryable trait
338 if (!empty($errorShape = $result->getAwsErrorShape())) {
339 $definition = $errorShape->toArray();
340 if (!empty($definition['retryable'])) {
341 return true;
342 }
343 }
344
345 return false;
346 }
347
348 private function isThrottlingError($result)
349 {
350 if ($result instanceof AwsException) {
351 // Check pre-defined throttling errors
352 $throttlingErrors = self::$standardThrottlingErrors;
353 if (!empty($this->options['throttling_error_codes'])
354 && is_array($this->options['throttling_error_codes'])
355 ) {
356 foreach($this->options['throttling_error_codes'] as $code) {
357 $throttlingErrors[$code] = true;
358 }
359 }
360 if (!empty($result->getAwsErrorCode())
361 && !empty($throttlingErrors[$result->getAwsErrorCode()])
362 ) {
363 return true;
364 }
365
366 // Check error shape for the throttling trait
367 if (!empty($errorShape = $result->getAwsErrorShape())) {
368 $definition = $errorShape->toArray();
369 if (!empty($definition['retryable']['throttling'])) {
370 return true;
371 }
372 }
373 }
374
375 return false;
376 }
377 }
378