Skip to content

Commit f144b41

Browse files
committed
Increase Guzzle timeout to 15 seconds for long achievement queries.
1 parent ef01e4c commit f144b41

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/XIVAPI/Guzzle/Guzzle.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
class Guzzle
1010
{
11-
const TIMEOUT = 10.0;
11+
const TIMEOUT = 15.0;
1212
const VERIFY = false;
13-
13+
1414
/** @var Client */
1515
private static $client = null;
1616
/** @var bool */
@@ -19,7 +19,7 @@ class Guzzle
1919
private static $environment = null;
2020
/** @var array */
2121
private static $options = [];
22-
22+
2323
/**
2424
* Set the Guzzle client
2525
*/
@@ -31,7 +31,7 @@ private static function setClient()
3131
'verify' => self::VERIFY,
3232
]);
3333
}
34-
34+
3535
public static function setEnvironment(string $environment): void
3636
{
3737
self::$environment = $environment;
@@ -40,7 +40,7 @@ public static function setEnvironment(string $environment): void
4040
public static function query($method, $apiEndpoint, $options = [])
4141
{
4242
self::setClient();
43-
43+
4444
// set XIVAPI key
4545
if ($key = getenv(Environment::XIVAPI_KEY)) {
4646
$options[RequestOptions::QUERY]['private_key'] = $key;
@@ -51,7 +51,7 @@ public static function query($method, $apiEndpoint, $options = [])
5151
$value = is_array($value) ? implode(',', $value) : $value;
5252
$options[RequestOptions::QUERY][$query] = $value;
5353
}
54-
54+
5555
// allow async
5656
if (self::$async) {
5757
return self::$client->requestAsync($method, $apiEndpoint, $options);
@@ -61,17 +61,17 @@ public static function query($method, $apiEndpoint, $options = [])
6161
self::$client->request($method, $apiEndpoint, $options)->getBody()
6262
);
6363
}
64-
64+
6565
public static function setAsync()
6666
{
6767
self::$async = true;
6868
}
69-
69+
7070
public static function resetQuery()
7171
{
7272
self::$options = [];
7373
}
74-
74+
7575
public static function setQuery(string $query, $value)
7676
{
7777
self::$options[$query] = $value;

0 commit comments

Comments
 (0)