I'm going to use the site_update timestamp to indicate whenever we successfully connect with a site. This way we can mark hubs dead on non-directory servers; but we have to wait before implementing this until we have a history of site_update being updated.
This commit is contained in:
parent
85f79990af
commit
99e4d2362c
@ -984,6 +984,14 @@ function zot_process_response($hub,$arr,$outq) {
|
|||||||
logger('zot_process_response: headers: ' . print_r($arr['header'],true), LOGGER_DATA);
|
logger('zot_process_response: headers: ' . print_r($arr['header'],true), LOGGER_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update the timestamp for this site
|
||||||
|
|
||||||
|
$r = q("update site set site_update = '%s' where site_url = '%s'",
|
||||||
|
dbesc(datetime_convert()),
|
||||||
|
dbesc(dirname($hub))
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// synchronous message types are handled immediately
|
// synchronous message types are handled immediately
|
||||||
// async messages remain in the queue until processed.
|
// async messages remain in the queue until processed.
|
||||||
|
|
||||||
@ -2585,6 +2593,13 @@ function import_site($arr,$pubkey) {
|
|||||||
logger('import_site: update failed. ' . print_r($arr,true));
|
logger('import_site: update failed. ' . print_r($arr,true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// update the timestamp to indicate we communicated with this site
|
||||||
|
q("update site set site_update = '%s' where site_url = '%s'",
|
||||||
|
dbesc(datetime_convert()),
|
||||||
|
dbesc($url)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$update = true;
|
$update = true;
|
||||||
|
Reference in New Issue
Block a user