Move option-dependent constants to getopt

dev
gravel 2 years ago
parent 8af37a3f09
commit 03c495ff92
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -19,20 +19,6 @@
$REPOSITORY_CANONICAL_URL="https://codeberg.org/gravel/sessioncommunities.online"; $REPOSITORY_CANONICAL_URL="https://codeberg.org/gravel/sessioncommunities.online";
// set timeout for file_get_contents()
ini_set('default_socket_timeout', 6); // in seconds, default is 60
// curl timeout in milliseconds
// max time for initiation of the connection
$CURL_CONNECT_TIMEOUT_MS = 2000;
// max time for each connection (incl. transfer)
$CURL_TIMEOUT_MS = $FAST_FETCH_MODE ? 1500 : 3000;
// delay between retries in miliseconds
$CURL_RETRY_SLEEP = 2000;
// do not report warnings (timeouts, SSL/TLS errors) // do not report warnings (timeouts, SSL/TLS errors)
error_reporting(E_ALL & ~E_WARNING); error_reporting(E_ALL & ~E_WARNING);

@ -14,4 +14,18 @@
if (isset($options["no-color"])) { if (isset($options["no-color"])) {
LoggingVerbosity::$showColor = false; LoggingVerbosity::$showColor = false;
} }
// set timeout for file_get_contents()
ini_set('default_socket_timeout', 6); // in seconds, default is 60
// curl timeout in milliseconds
// max time for initiation of the connection
$CURL_CONNECT_TIMEOUT_MS = 2000;
// max time for each connection (incl. transfer)
$CURL_TIMEOUT_MS = $FAST_FETCH_MODE ? 1500 : 3000;
// delay between retries in miliseconds
$CURL_RETRY_SLEEP = 2000;
?> ?>
Loading…
Cancel
Save