PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.18
ووسلام – همگام سازی ووکامرس و باسلام v1.10.18
1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 1.8.7 1.8.4 All 51 releases
sync-basalam / includes / Jobs / Exceptions / RetryableException.php

RetryableException.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.18, at includes/Jobs/Exceptions/RetryableException.php

43 lines 949 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SyncBasalam\Jobs\Exceptions;
4
5 defined('ABSPATH') || exit;
6
7
8 class RetryableException extends JobException
9 {
10 public function shouldRetry(): bool
11 {
12 return true;
13 }
14
15 public static function apiTimeout(string $message = 'درخواست با تای�
16 اوت �
17 واجه شد.'): self
18 {
19 return new self($message, 408);
20 }
21
22 public static function networkError(string $message = 'خطای ارتباط شبکه ای'): self
23 {
24 return new self($message, 503);
25 }
26
27 public static function rateLimit(string $message = 'خطای rate limit رخ داد.'): self
28 {
29 return new self($message, 429);
30 }
31
32 public static function serverError(string $message = 'خطای سرور'): self
33 {
34 return new self($message, 500);
35 }
36
37 public static function temporary(string $message = 'خطای �
38 وقتی'): self
39 {
40 return new self($message, 0);
41 }
42 }
43