Skip to content

Conversation

@marcelklehr
Copy link
Member

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

@marcelklehr marcelklehr added this to the Nextcloud 33 milestone Oct 14, 2025
@marcelklehr marcelklehr requested a review from a team as a code owner October 14, 2025 09:08
@marcelklehr marcelklehr requested review from Altahrim, CarlSchwan and provokateurin and removed request for a team October 14, 2025 09:08
@marcelklehr marcelklehr added the 3. to review Waiting for reviews label Oct 14, 2025
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woop 🎉

Copy link
Contributor

@oleksandr-nc oleksandr-nc left a 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.

@marcelklehr
Copy link
Member Author

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 <mklehr@gmx.net>

# Conflicts:
#	lib/private/TaskProcessing/Db/TaskMapper.php
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the feat/taskprocessing-trigger-aware-provider branch from 7bb6f23 to 7f15598 Compare October 20, 2025 13:59
@marcelklehr marcelklehr merged commit 43d28f4 into master Oct 21, 2025
204 of 209 checks passed
@marcelklehr marcelklehr deleted the feat/taskprocessing-trigger-aware-provider branch October 21, 2025 06:33
@nextcloud-bot nextcloud-bot mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants