Browse Source

update config folding

main
yggverse 8 months ago
parent
commit
5705f452cc
  1. 24
      example/config.json
  2. 6
      src/cli/document/crawl.php

24
example/config.json

@ -142,6 +142,18 @@
"error":true "error":true
} }
}, },
"network":
{
"check":
{
"enabled":true,
"timeout":5,
"socket":
{
"201:5eb5:f061:678e:7565:6338:c02c:5251":80
}
}
},
"curl": "curl":
{ {
"connection": "connection":
@ -350,17 +362,5 @@
] ]
} }
} }
},
"network":
{
"check":
{
"enabled":true,
"timeout":5,
"socket":
{
"201:5eb5:f061:678e:7565:6338:c02c:5251":80
}
}
} }
} }

6
src/cli/document/crawl.php

@ -66,11 +66,11 @@ if (false === sem_acquire($semaphore, true))
} }
// Check network connection // Check network connection
if ($config->network->check->enabled) if ($config->cli->document->crawl->network->check->enabled)
{ {
$network = false; $network = false;
foreach ($config->network->check->socket as $host => $port) foreach ($config->cli->document->crawl->network->check->socket as $host => $port)
{ {
if ($config->cli->document->crawl->debug->level->notice) if ($config->cli->document->crawl->debug->level->notice)
{ {
@ -82,7 +82,7 @@ if ($config->network->check->enabled)
); );
} }
if (\Yggverse\Net\Socket::isOpen($host, $port, $config->network->check->timeout)) if (\Yggverse\Net\Socket::isOpen($host, $port, $config->cli->document->crawl->network->check->timeout))
{ {
if ($config->cli->document->crawl->debug->level->notice) if ($config->cli->document->crawl->debug->level->notice)
{ {

Loading…
Cancel
Save