mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:42:54 +00:00
Do a recheck when the server isn't available.
This commit is contained in:
parent
5f524006dd
commit
072d7f6b3c
1 changed files with 13 additions and 0 deletions
|
@ -239,6 +239,18 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
|
||||||
if ((($network == "") OR ($name == "") OR ($profile_photo == "") OR ($server_url == ""))
|
if ((($network == "") OR ($name == "") OR ($profile_photo == "") OR ($server_url == ""))
|
||||||
AND poco_reachable($profile_url, $server_url, $network)) {
|
AND poco_reachable($profile_url, $server_url, $network)) {
|
||||||
$data = probe_url($profile_url);
|
$data = probe_url($profile_url);
|
||||||
|
|
||||||
|
// If the system doesn't seem to react, recheck the server
|
||||||
|
if ($data["network"] == NETWORK_FEED) {
|
||||||
|
logger("Recheck the server for profile ".$profile_url, LOGGER_DEBUG);
|
||||||
|
if ($server_url == "")
|
||||||
|
$url_check = poco_detect_server($profile_url);
|
||||||
|
else
|
||||||
|
$url_check = $server_url;
|
||||||
|
|
||||||
|
poco_check_server($url_check, $network, true);
|
||||||
|
}
|
||||||
|
|
||||||
$network = $data["network"];
|
$network = $data["network"];
|
||||||
$name = $data["name"];
|
$name = $data["name"];
|
||||||
$nick = $data["nick"];
|
$nick = $data["nick"];
|
||||||
|
@ -1208,6 +1220,7 @@ function poco_discover($complete = false) {
|
||||||
$no_of_queries = 5;
|
$no_of_queries = 5;
|
||||||
|
|
||||||
$last_update = date("c", time() - (60 * 60 * 6)); // 24
|
$last_update = date("c", time() - (60 * 60 * 6)); // 24
|
||||||
|
$last_update = date("c", time() - (60 * 60 * 24)); // 24
|
||||||
|
|
||||||
$r = q("SELECT `poco`, `nurl`, `url`, `network` FROM `gserver` WHERE `last_contact` > `last_failure` AND `poco` != '' AND `last_poco_query` < '%s' ORDER BY RAND()", dbesc($last_update));
|
$r = q("SELECT `poco`, `nurl`, `url`, `network` FROM `gserver` WHERE `last_contact` > `last_failure` AND `poco` != '' AND `last_poco_query` < '%s' ORDER BY RAND()", dbesc($last_update));
|
||||||
if ($r)
|
if ($r)
|
||||||
|
|
Loading…
Reference in a new issue