Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Flushing at exit #55

Open
jonleighton opened this issue Sep 21, 2016 · 1 comment
Open

Flushing at exit #55

jonleighton opened this issue Sep 21, 2016 · 1 comment

Comments

@jonleighton
Copy link

I'm switching from using statsd to using this gem, and I was surprised to not be able to find any code which is ensuring a final flush is performed before the process exits. Is there a reason for this? It obviously means that when a server is restarted then there will be up to flush_interval of data loss.

I was able to achieve the final flush via:

at_exit { Librato.tracker.flush }

Perhaps this isn't included by default for some reason I haven't thought of. Is there any reason not to do this?

Thanks

@nextmat
Copy link
Contributor

nextmat commented Oct 4, 2016

@jonleighton - apologies for the delayed response. This is a great point. Originally I think we had some reservations about some possible negative aspects of an at_exit force flush but at this point I think adding it would make a lot of sense.

we'll do a little digging and look into adding this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants