-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[TaskProcessing] Add manager::runTask method #47522
Conversation
…onously Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
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? |
@bigcat88 Yes, just adding something. |
/backport to stable30 |
…dJob Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
4b849ef
to
396b8f5
Compare
@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). |
@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. |
Add
OCP\TaskProcessing\IManager::runTask
method 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
scheduleTask
andrunTask
.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.