[TaskProcessing] Add manager::runTask method#47522
Merged
Conversation
…onously Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Member
|
just to clarify, this doesn't affect our APIs in any way, everything remains compatible with what we did - is it just adding a synchronous method? |
Member
Author
|
@bigcat88 Yes, just adding something. |
Member
Author
|
/backport to stable30 |
bigcat88
approved these changes
Aug 27, 2024
…dJob Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
4b849ef to
396b8f5
Compare
AndyScherzinger
approved these changes
Aug 27, 2024
Member
|
@julien-nc is there a way for the old, synchronous API to call this new one? or the implementation behind it? This way the mobile apps won't have to migrate right away (which would else also need to be managed right away now). |
Member
Author
|
@AndyScherzinger I would have to check with Marcel. IMO it could work, we would only do it for the hardcoded task types in text processing. |
Merged
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.
Add
OCP\TaskProcessing\IManager::runTaskmethod to run tasks synchronously.The changeset looks big but it's just moving stuff from the background job to the manager and refactoring the manager a bit to factorize stuff between
scheduleTaskandrunTask.Additional change: Fix the condition to reschedule the background job. As discussed with @kyteinsky, knowing that some synchronous providers can handle currently scheduled tasks is not enough. They have to be a preferred provider (selected in the AI admin settings).
This should be backported to stable30.