Method: Honeybadger::Agent#flush
- Defined in:
- lib/honeybadger/agent.rb
permalink #flush { ... } ⇒ Object, Boolean
Flushes all data from workers before returning. This is most useful in tests when using the test backend, where normally the asynchronous nature of this library could create race conditions.
365 366 367 368 369 370 371 372 |
# File 'lib/honeybadger/agent.rb', line 365 def flush return true unless block_given? yield ensure worker.flush events_worker&.flush metrics_worker&.flush end |