Skip to content

Commit

Permalink
Checkable#UpdateNextCheck(): allow to suppress next_check listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Sep 26, 2024
1 parent 01d3a1d commit 9d9f1de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/icinga/checkable-check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ long Checkable::GetSchedulingOffset()
return m_SchedulingOffset;
}

void Checkable::UpdateNextCheck(const MessageOrigin::Ptr& origin)
void Checkable::UpdateNextCheck(const MessageOrigin::Ptr& origin, bool suppressEvents)
{
double interval;

Expand All @@ -75,7 +75,7 @@ void Checkable::UpdateNextCheck(const MessageOrigin::Ptr& origin)
<< "' from last check time at " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", (lastCheck < 0 ? 0 : lastCheck))
<< " (" << GetLastCheck() << ") to next check time at " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", nextCheck) << " (" << nextCheck << ").";

SetNextCheck(nextCheck, false, origin);
SetNextCheck(nextCheck, suppressEvents, origin);
}

bool Checkable::HasBeenChecked() const
Expand Down
2 changes: 1 addition & 1 deletion lib/icinga/checkable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Checkable : public ObjectImpl<Checkable>
long GetSchedulingOffset();
void SetSchedulingOffset(long offset);

void UpdateNextCheck(const MessageOrigin::Ptr& origin = nullptr);
void UpdateNextCheck(const MessageOrigin::Ptr& origin = nullptr, bool suppressEvents = false);

bool HasBeenChecked() const;
virtual bool IsStateOK(ServiceState state) const = 0;
Expand Down

0 comments on commit 9d9f1de

Please sign in to comment.