Don’t INSERT an instance if it did not respond: it was useful before instance “deadness” was autonomously managed by peerscrawl.php
This commit is contained in:
parent
e7eb303094
commit
b929d06302
1 changed files with 7 additions and 1 deletions
|
@ -611,7 +611,13 @@ $query.=implode(', ',$set);
|
||||||
if (!is_null($oidata)) $query.=' WHERE ID='.$oidata['ID'];
|
if (!is_null($oidata)) $query.=' WHERE ID='.$oidata['ID'];
|
||||||
|
|
||||||
eecho(1,'query: «'.$query.'».'.N);
|
eecho(1,'query: «'.$query.'».'.N);
|
||||||
if (!$opts['dryrun']) myq($link,$query,__LINE__);
|
if (!$opts['dryrun']) {
|
||||||
|
if (!is_null($oidata) || $instanswered) {
|
||||||
|
myq($link,$query,__LINE__);
|
||||||
|
} else {
|
||||||
|
mexit('«'.$opts['hostname'].'»: not inserting unknown instance because it did not respond; shutting down after '.ght(time()-$now,null,0).' :-)'.N,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (is_null($oidata)) {
|
if (is_null($oidata)) {
|
||||||
(!$opts['dryrun']) ? $instid=mysqli_insert_id($link) : $instid=0;
|
(!$opts['dryrun']) ? $instid=mysqli_insert_id($link) : $instid=0;
|
||||||
|
|
Loading…
Reference in a new issue