Open
Conversation
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>
80cb6c6 to
73911a5
Compare
There was a problem hiding this comment.
Pull request overview
This PR shifts ContextChat indexing/action processing from in-app background jobs/task processing providers to an external “pull” model by exposing queue endpoints and adding DB-level queue item locking.
Changes:
- Removed synchronous TaskProcessing providers and multiple background jobs/CLI scanning components.
- Added queue locking (
locked_at) and lock-aware queue access methods in DB mappers (plus a schema migration). - Introduced an OCS controller exposing ExApp endpoints to fetch/lock/delete queued work items and read file contents.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/TaskProcessing/ContextChatSearchProvider.php | Removed legacy TaskProcessing search provider. |
| lib/TaskProcessing/ContextChatProvider.php | Removed legacy TaskProcessing chat provider (incl. indexing-on-demand logic). |
| lib/Service/ScanService.php | Removed file scanning/indexing service used by old flow. |
| lib/Service/QueueService.php | Simplified queue insertion/counting (job scheduling removed). |
| lib/Migration/Version006000000Date20260302135634.php | Adds locked_at columns + indexes to queue tables. |
| lib/Db/QueueMapper.php | Adds locking support and changes queue retrieval/removal APIs. |
| lib/Db/QueueFile.php | Adds locked_at field mapping + JSON serialization. |
| lib/Db/QueueContentItemMapper.php | Adds bulk delete, lock counting, and locking support for content queue items. |
| lib/Db/QueueContentItem.php | Adds locked_at field mapping + JSON serialization. |
| lib/Db/QueueActionMapper.php | Adds locking support, bulk delete, and lock-aware counts for actions. |
| lib/Db/QueueAction.php | Adds locked_at field mapping + JSON serialization. |
| lib/Controller/QueueController.php | New OCS endpoints for ExApp queue consumption + file streaming. |
| lib/Command/ScanFiles.php | Removed CLI scan command from old flow. |
| lib/BackgroundJobs/SubmitContentJob.php | Removed content submission background job from old flow. |
| lib/BackgroundJobs/IndexerJob.php | Removed file indexer background job from old flow. |
| lib/BackgroundJobs/ActionJob.php | Removed action-processing background job from old flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
commented
Mar 4, 2026
lib/Controller/QueueController.php
Outdated
| if ($userId === null) { | ||
| $file = $rootFolder->getFirstNodeById($fileId); | ||
| } else { | ||
| $file = $rootFolder->getUserFolder($userId)->getById($fileId); |
Member
Author
There was a problem hiding this comment.
Should this be getFirstNodeById?
marcelklehr
commented
Mar 4, 2026
Comment on lines
+180
to
+184
| $locked = $queueMapper->countLocked(); | ||
| foreach ($contentItemMapper->countLocked() as $providerCount) { | ||
| $locked += $providerCount; | ||
| } | ||
| return new DataResponse([ 'scheduled' => $count, 'running' => $locked ]); |
Member
Author
There was a problem hiding this comment.
Suggested change
| $locked = $queueMapper->countLocked(); | |
| foreach ($contentItemMapper->countLocked() as $providerCount) { | |
| $locked += $providerCount; | |
| } | |
| return new DataResponse([ 'scheduled' => $count, 'running' => $locked ]); | |
| $lockedCount = $queueMapper->countLocked(); | |
| foreach ($contentItemMapper->countLocked() as $providerCount) { | |
| $lockedCount += $providerCount; | |
| } | |
| return new DataResponse([ 'scheduled' => $count, 'running' => $lockedCount ]); |
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
marcelklehr
commented
Apr 7, 2026
appinfo/info.xml
Outdated
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.