-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(TaskProcessing): Introduce ITriggerableProvider #55741
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
feat(TaskProcessing): Introduce ITriggerableProvider #55741
Conversation
julien-nc
left a comment
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.
Woop 🎉
4fc76fe to
d04af80
Compare
oleksandr-nc
left a comment
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.
Can we add some context to the logs, like to both new error logs to include at least taskTypeId and (if available) the provider id?
Can we split try-catch block? Currently if trigger call will raise exception it can print Failed to check DB for running tasks after a task was scheduled for a triggerable provider. Not triggering the provider. which will be misleading, imho.
Only if trigger() throws an OCP\Db\Exception, which is unlikely, but I'm happy to split it. |
Signed-off-by: Marcel Klehr <[email protected]> # Conflicts: # lib/private/TaskProcessing/Db/TaskMapper.php
Signed-off-by: Marcel Klehr <[email protected]>
Signed-off-by: Marcel Klehr <[email protected]>
7bb6f23 to
7f15598
Compare
Summary
This is part of a larger project to reduce the polling pressure on the server from ex apps. This PR introduces Triggerable Providers which will usually be ex app providers. Once a new task becomes available while no other task is running, this will call the trigger method on the provider to nudge it to ask for more tasks.
Checklist
3. to review, feature component)stable32)