mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
ElasticWriter: Ensure to flush buffers on Pause/Shutdown/Reload
This commit is contained in:
parent
1bfe756cb1
commit
301c48e9bc
@ -104,13 +104,16 @@ void ElasticsearchWriter::Resume()
|
||||
Checkable::OnNotificationSentToAllUsers.connect(std::bind(&ElasticsearchWriter::NotificationSentToAllUsersHandler, this, _1, _2, _3, _4, _5, _6, _7));
|
||||
}
|
||||
|
||||
/* Pause is equivalent to Stop, but with HA capabilities to resume at runtime. */
|
||||
void ElasticsearchWriter::Pause()
|
||||
{
|
||||
Flush();
|
||||
m_WorkQueue.Join();
|
||||
Flush();
|
||||
|
||||
Log(LogInformation, "ElasticsearchWriter")
|
||||
<< "'" << GetName() << "' paused.";
|
||||
|
||||
m_WorkQueue.Join();
|
||||
|
||||
ObjectImpl<ElasticsearchWriter>::Pause();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user