File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -61,3 +61,12 @@ def expire_events(self):
61
61
:return:
62
62
"""
63
63
pass
64
+
65
+ # ----------------------------------------------------------------------
66
+ @abstractmethod
67
+ def get_non_flushed_event_count (self ):
68
+ """Determine the count of pending events in the cache which need to be sent to Logstash.
69
+
70
+ :return: Count of pending events
71
+ """
72
+ pass
Original file line number Diff line number Diff line change @@ -93,3 +93,7 @@ def _delete_events(self, ids_to_delete):
93
93
self .logger .warning (
94
94
"Could not delete event with id %s. It does not appear to be in the cache." ,
95
95
event_id )
96
+
97
+ # ----------------------------------------------------------------------
98
+ def get_non_flushed_event_count (self ):
99
+ return len ([event for event in self ._cache .values () if not event ['pending_delete' ]])
You can’t perform that action at this time.
0 commit comments