Used in DB IDO and Livestatus. */
| 169 | |
| 170 | /* Used in DB IDO and Livestatus. */ |
| 171 | double CompatUtility::GetCheckableNotificationNotificationInterval(const Checkable::Ptr& checkable) |
| 172 | { |
| 173 | double notification_interval = -1; |
| 174 | |
| 175 | for (const Notification::Ptr& notification : checkable->GetNotifications()) { |
| 176 | if (notification_interval == -1 || notification->GetInterval() < notification_interval) |
| 177 | notification_interval = notification->GetInterval(); |
| 178 | } |
| 179 | |
| 180 | if (notification_interval == -1) |
| 181 | notification_interval = 60; |
| 182 | |
| 183 | return notification_interval / 60.0; |
| 184 | } |
| 185 | |
| 186 | /* Helper. */ |
| 187 | int CompatUtility::GetCheckableNotificationTypeFilter(const Checkable::Ptr& checkable) |
nothing calls this directly
no test coverage detected