pleroma_healthcheck: Avoid div by 0
This commit is contained in:
parent
b448f0fcb1
commit
63f106a250
@ -153,7 +153,11 @@ if ($response->is_success) {
|
||||
print "job_queue_", $k, "_success.min 0\n";
|
||||
print "job_queue_", $k, "_success.max 100\n";
|
||||
} else {
|
||||
print "job_queue_", $k, "_success.value ", ($v->{'success'}/$v->{'processed_jobs'})*100, "\n";
|
||||
if ($v->{'processed_jobs'} == 0) {
|
||||
print "job_queue_", $k, "_success.value 0\n";
|
||||
} else
|
||||
print "job_queue_", $k, "_success.value ", ($v->{'success'}/$v->{'processed_jobs'})*100, "\n";
|
||||
}
|
||||
}
|
||||
|
||||
#print "job_queue_", $k, "_failed.label job queue ", $k, " failure%\n";
|
||||
|
Loading…
Reference in New Issue
Block a user