Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the Last Position on unwatch #45

Open
jaliph opened this issue Aug 16, 2016 · 4 comments
Open

Get the Last Position on unwatch #45

jaliph opened this issue Aug 16, 2016 · 4 comments

Comments

@jaliph
Copy link

jaliph commented Aug 16, 2016

Can we have a last position on unwatch from where we can resume if we re watch the file again?

This feature will help in making the system fault tolerant. Please look into this.

@lucagrulla
Copy link
Owner

I'll think about it but I can't see any neat way to support this feature request and not breaking the current behaviour.

@jaliph
Copy link
Author

jaliph commented Aug 29, 2016

Thanks a lot for considering it.

Have a look into this : https://github.com/mingqi/tailF

It has something "unwatch" and position to continue with it later.

@lucagrulla
Copy link
Owner

Hi,

Thanks for the link.

That way it's implemented in that library it's not making the system fault tolerant. Given it has to be an explicit call to unwatch to get the latest known position that won't happen in the scenario of a system crash. What is the actual behaviour you're looking for? Can you describe me the use cases?

@jaliph
Copy link
Author

jaliph commented Aug 31, 2016

The actual use case is about having a a log reader dynamically.. But incase the file is not getting modifed for long or SIGTERM is received, we can unwatch it and start again from the same instance.

Thus we can maintain a consistency while reading logs.

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

No branches or pull requests

2 participants