Merge pull request #306 from chai-nadig/chai/set-flush-interval

Set Flush Interval on EventQueue
This commit is contained in:
Matthias Rampke 2020-05-29 08:43:41 +02:00 committed by GitHub
commit 3630398b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,6 +84,7 @@ func NewEventQueue(c chan Events, flushThreshold int, flushInterval time.Duratio
eq := &EventQueue{ eq := &EventQueue{
C: c, C: c,
flushThreshold: flushThreshold, flushThreshold: flushThreshold,
flushInterval: flushInterval,
flushTicker: ticker, flushTicker: ticker,
q: make([]Event, 0, flushThreshold), q: make([]Event, 0, flushThreshold),
eventsFlushed: eventsFlushed, eventsFlushed: eventsFlushed,