flush writes out the worker buffer and handles errors. It also restarts the ticker. Returns true to indicate success.
(ctx context.Context)
| 670 | // It also restarts the ticker. |
| 671 | // Returns true to indicate success. |
| 672 | func (w *worker) flush(ctx context.Context) bool { |
| 673 | ok := true |
| 674 | if err := w.flushBuffer(ctx); err != nil { |
| 675 | ok = false |
| 676 | } |
| 677 | w.ticker.Reset(w.bi.nextFlushInterval()) |
| 678 | return ok |
| 679 | } |
| 680 | |
| 681 | // flushBuffer writes out the worker buffer. |
| 682 | // |
no test coverage detected