Open tvb opened 10 years ago
Hmm, seems https://github.com/gocom/danpu/blob/master/src/Rah/Danpu/Base.php#L223 is not called in case of a failure?
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.
Not sure why the tmp files remain then. I will see if I can reproduce the issue.
Or unable to connect is treated as FATAL?
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.