more delivery diagnostics
This commit is contained in:
parent
db16ea8527
commit
791302f317
@ -32,7 +32,7 @@ function deliver_run($argv, $argc) {
|
|||||||
else {
|
else {
|
||||||
$result = zot_zot($r[0]['outq_posturl'],$r[0]['outq_notify']);
|
$result = zot_zot($r[0]['outq_posturl'],$r[0]['outq_notify']);
|
||||||
if($result['success']) {
|
if($result['success']) {
|
||||||
zot_process_response($result, $r[0]);
|
zot_process_response($r[0]['outq_posturl'],$result, $r[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$y = q("update outq set outq_updated = '%s' where outq_hash = '%s' limit 1",
|
$y = q("update outq set outq_updated = '%s' where outq_hash = '%s' limit 1",
|
||||||
|
@ -43,7 +43,7 @@ function queue_run($argv, $argc){
|
|||||||
continue;
|
continue;
|
||||||
$result = zot_zot($rr['outq_posturl'],$rr['outq_notify']);
|
$result = zot_zot($rr['outq_posturl'],$rr['outq_notify']);
|
||||||
if($result['success']) {
|
if($result['success']) {
|
||||||
zot_process_response($result, $rr);
|
zot_process_response($rr['outq_posturl'],$result, $rr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$deadguys[] = $rr['outq_hub'];
|
$deadguys[] = $rr['outq_hub'];
|
||||||
|
@ -607,12 +607,20 @@ function import_xchan($arr) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
function zot_process_response($arr,$outq) {
|
function zot_process_response($hub,$arr,$outq) {
|
||||||
if(! $arr['success'])
|
|
||||||
|
if(! $arr['success']) {
|
||||||
|
logger('zot_process_response: failed: ' . $hub);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$x = json_decode($arr['body'],true);
|
$x = json_decode($arr['body'],true);
|
||||||
|
|
||||||
|
if(! $x) {
|
||||||
|
logger('zot_process_response: No json from ' . $hub);
|
||||||
|
logger('zot_process_response: headers: ' . print_r($arr['header'],true), LOGGER_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
// 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.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user