mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Merge pull request #6430 from Icinga/fix/workqueue-log-message
Fix negative 'empty in' value in WorkQueue log message
This commit is contained in:
commit
62e91e1891
@ -24,6 +24,7 @@
|
|||||||
#include "base/application.hpp"
|
#include "base/application.hpp"
|
||||||
#include "base/exception.hpp"
|
#include "base/exception.hpp"
|
||||||
#include <boost/thread/tss.hpp>
|
#include <boost/thread/tss.hpp>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
@ -221,7 +222,7 @@ void WorkQueue::StatusTimerHandler()
|
|||||||
|
|
||||||
if (pending > GetTaskCount(5)) {
|
if (pending > GetTaskCount(5)) {
|
||||||
timeInfo = " empty in ";
|
timeInfo = " empty in ";
|
||||||
if (timeToZero < 0)
|
if (timeToZero < 0 || std::isinf(timeToZero))
|
||||||
timeInfo += "infinite time, your task handler isn't able to keep up";
|
timeInfo += "infinite time, your task handler isn't able to keep up";
|
||||||
else
|
else
|
||||||
timeInfo += Utility::FormatDuration(timeToZero);
|
timeInfo += Utility::FormatDuration(timeToZero);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user