You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to move a shared folder out of the cloud after a predfinded (expandable) time (this point is solved) and under the condition that there is no upload of files into this folder any more (unsolved).
My problem is that I don't know how to check for a "locked" or "busy" state.
When I use oc.delete or oc.move I can detect an http error, which tells me that folder is still in use. Unforunately both commands effectivly work despite this error (folder is deleted /moved), so the user upload is stopped (and gone) and I get a "fatal" lock entry in the log file. So there's no chance to transfer the folder later when upload is finished.
When I use the web frontend to delete the directory by hand the behaviour on the other hand is correct: I get an error message that the folder can't be deleted, the folder stays and the upload continues.
Renaming the folder through webdav during the upload is possible without any error - so again no solution to detect a running upload.
I tested the above by doing the folder manipuations during upload of a folder with a very large file. Unfortunately the file doesn't show up in the cloud before download is finished. So a file size tracking is no approach either.
I would need a hint how to approch the above problem. We're installing a transfer platform for a number of users and for data we can't leave in the cloud. At the moment my only workaround is to wait for a long time between creation and moving of the folder. Next I'll try what happens when I work on folders which are provided by the official windows sync client.
The text was updated successfully, but these errors were encountered:
Solved the problem myself:
the upload is breaking because I refreshed the page in the web frontend to see if my folder has moved!
Detecting if a folder is "busy" works well by toggling the folder name with the move command (renaming to the same name doesn't work) and checking if command fails or not.
@tstreibl there is currently no API in core to do that. Good that you found a workaround.
It seems this goes a bit in the topic of async file operations owncloud/core#24509 where I'd expect an API to be able to tell whether there is an operation pending on a given folder.
@PVince81 yes, it's beyond the scope of the library at the moment -but good to see that core is already ahead. Thanks for the link. Not easy at all...
Was only astonished that I could stop a web interface initiated upload by a simple page refresh in the web interface! On the other hand changing folder or going back and forth during an upload works like a charm. In my case a user refresh is tempting and absolutely ok after an upload, because it shows the user e.g. if the folder has been shipped (by my software in the background) or not. But that's an issue which has nothing to do with pyocclient.
Hi,
I want to move a shared folder out of the cloud after a predfinded (expandable) time (this point is solved) and under the condition that there is no upload of files into this folder any more (unsolved).
My problem is that I don't know how to check for a "locked" or "busy" state.
When I use oc.delete or oc.move I can detect an http error, which tells me that folder is still in use. Unforunately both commands effectivly work despite this error (folder is deleted /moved), so the user upload is stopped (and gone) and I get a "fatal" lock entry in the log file. So there's no chance to transfer the folder later when upload is finished.
When I use the web frontend to delete the directory by hand the behaviour on the other hand is correct: I get an error message that the folder can't be deleted, the folder stays and the upload continues.
Renaming the folder through webdav during the upload is possible without any error - so again no solution to detect a running upload.
I tested the above by doing the folder manipuations during upload of a folder with a very large file. Unfortunately the file doesn't show up in the cloud before download is finished. So a file size tracking is no approach either.
I would need a hint how to approch the above problem. We're installing a transfer platform for a number of users and for data we can't leave in the cloud. At the moment my only workaround is to wait for a long time between creation and moving of the folder. Next I'll try what happens when I work on folders which are provided by the official windows sync client.
The text was updated successfully, but these errors were encountered: