Repository navigation
Expire files from the trash in the background - #14644
Conversation
There was a problem hiding this comment.
hmm - what for we require that class?
There was a problem hiding this comment.
Might also be worth it to use this when in CLI mode/cron instead of the async bus to run commands triggered from commands immediately
There was a problem hiding this comment.
@DeepDiver1975 seems to be needed for the unit test.
There was a problem hiding this comment.
In case this is a pure test helper class - it should live in the tests namespace
|
What if expire is called multiple times due for example to the sync client uploading 3 files at the same time ? I feel like there are several scenarios where we might want to have some kind of debounce that either only runs the first scheduled instance or the last one (defer to later). What do you think ? |
|
Worst case: 2 out of 3 jobs will find nothing to do and terminate quickly - this is what happens today as well - the expiry code is triggered on every request and wastes cpu. |
|
And yes - some kind of debounce logic might be interesting - but I prefer to add this in a later stage. Let's get this system stable first and see what we can get out of it. |
There was a problem hiding this comment.
In case multiple commands are executed for different users the filesystem will only be mounted for the first user.
Looks like we need some kind of tear down as well ....
There was a problem hiding this comment.
Looks like we need some kind of tear down as well ....
There was a problem hiding this comment.
There is already a tearDownFS() method. One should just not forget about calling it...
I hope one day we can get rid of those static setupFS mess...
There was a problem hiding this comment.
\OC_Util::tearDownFS();|
@icewind1991 please have a look - THX |
|
The inspection completed: 3993 Issues, 120 Patches |
|
Refer to this link for build results (access rights to CI server needed): |
|
@DeepDiver1975 changes look good |
|
👍 for @icewind1991's changes |
counting as 👍 |
Expire files from the trash in the background
Move expiring the trash to the async command bus and add some generic logic to allow unit tests to work with the command bus.
Note that this is only a minimal set of changes to make it async, the trash app could use some further cleanup.
cc @DeepDiver1975 @PVince81 @schiesbn