-
Notifications
You must be signed in to change notification settings - Fork 55
refactor(FileListener): Process file events asynchronously #1429
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
Conversation
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors file event processing to be asynchronous by introducing a queue-based system for access updates. When files are shared or permissions change, instead of processing the updates immediately in the event handler, the changes are now queued to a database table and processed asynchronously via a background job. This improves the responsiveness of file operations by deferring expensive face detection synchronization logic.
- Introduces a new
recognize_access_updatesdatabase table to queue access change events - Creates background job infrastructure to process queued access updates in batches
- Refactors FileListener to defer access update processing instead of handling synchronously
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/Migration/Version011000001Date20251215094821.php | Creates the new recognize_access_updates table schema |
| lib/Db/AccessUpdate.php | Entity class representing queued access update records |
| lib/Db/AccessUpdateMapper.php | Data access layer for managing access update queue entries |
| lib/Service/AccessUpdateService.php | Service containing the business logic moved from FileListener |
| lib/BackgroundJobs/ProcessAccessUpdatesJob.php | Background job that processes queued access updates asynchronously |
| lib/Hooks/FileListener.php | Refactored to queue access updates instead of processing synchronously; removes ShareCreatedEvent and ShareDeletedEvent handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
4f68ede to
a8fb342
Compare
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
eaeeafd to
82d555b
Compare
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…lly processed in queue Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…a user folder plus make sure to tear down fs in between action processing to prevent OOM Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
fixes #1161