mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
RedisConnection: drop superfluous GetConnected method
This commit is contained in:
parent
e0c239161b
commit
dd5289bf4e
3 changed files with 5 additions and 11 deletions
|
|
@ -101,7 +101,7 @@ void IcingadbCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckR
|
|||
|
||||
auto redis (conn->GetConnection());
|
||||
|
||||
if (!redis || !redis->GetConnected()) {
|
||||
if (!redis || !redis->IsConnected()) {
|
||||
ReportIcingadbCheck(checkable, commandObj, cr, producer, "Icinga DB CRITICAL: Not connected to Redis.", ServiceCritical);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,10 +86,6 @@ void RedisConnection::Start()
|
|||
}
|
||||
}
|
||||
|
||||
bool RedisConnection::IsConnected() {
|
||||
return m_Connected.load();
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a Redis query to a log message
|
||||
*
|
||||
|
|
|
|||
|
|
@ -119,7 +119,10 @@ struct RedisConnInfo final : SharedObject
|
|||
|
||||
void Start();
|
||||
|
||||
bool IsConnected();
|
||||
bool IsConnected() const
|
||||
{
|
||||
return m_Connected.load();
|
||||
}
|
||||
|
||||
void FireAndForgetQuery(Query query, QueryPriority priority, QueryAffects affects = {});
|
||||
void FireAndForgetQueries(Queries queries, QueryPriority priority, QueryAffects affects = {});
|
||||
|
|
@ -136,11 +139,6 @@ struct RedisConnInfo final : SharedObject
|
|||
|
||||
void SetConnectedCallback(std::function<void(boost::asio::yield_context& yc)> callback);
|
||||
|
||||
inline bool GetConnected()
|
||||
{
|
||||
return m_Connected.load();
|
||||
}
|
||||
|
||||
int GetQueryCount(RingBuffer::SizeType span);
|
||||
|
||||
inline int GetPendingQueryCount() const
|
||||
|
|
|
|||
Loading…
Reference in a new issue