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

Remove cache file if backup returns an error #13

Open
tvb opened this issue May 13, 2014 · 4 comments
Open

Remove cache file if backup returns an error #13

tvb opened this issue May 13, 2014 · 4 comments

Comments

@tvb
Copy link
Contributor

tvb commented May 13, 2014

I noticed danpu will place files of 0 bytes (i.e.: Rah_Danpu_CpCOO0) in the temporary folder if the backup fails for any reason (like unable to connect). Those should be removed to keep the working directory clean.

@tvb
Copy link
Contributor Author

tvb commented May 13, 2014

Hmm, seems https://github.com/gocom/danpu/blob/master/src/Rah/Danpu/Base.php#L223 is not called in case of a failure?

@gocom
Copy link
Owner

gocom commented May 16, 2014

The clean up is called on shutdown process via destructor method. The only case when it won't be called should be when the process dies on a FATAL error (e.g. when one doesn't capture exceptions, or the process terminates unexpectedly before normal shutdown) or other member in the shutdown chain kills the process.

@tvb
Copy link
Contributor Author

tvb commented May 16, 2014

Not sure why the tmp files remain then. I will see if I can reproduce the issue.

@tvb
Copy link
Contributor Author

tvb commented May 16, 2014

Or unable to connect is treated as FATAL?

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

No branches or pull requests

2 participants