Skip to content

Conversation

@julien-nc
Copy link
Member

@julien-nc julien-nc commented Aug 6, 2025

Summary

This is useful for the assistant audio chat for example. We don't cleanup the chat message history so we need to prevent cleaning up the AudioChat tasks. Those tasks are deleted when the chat history is deleted.

Changes proposed in this PR:

  • Move TaskProcessingApiController::extractFileIdsFromTask to OCP\TaskProcessing\IManager to be able to use it elsewhere
  • Add the cleanup column to oc_taskprocessing_tasks
  • Adjust the OC\TaskProcessing\Db\Task entity class
  • Change the cleanup logic: It used to delete the old tasks and then the old files (based on their MTime) in appData/TaskProcessing. It now gets the list of old tasks to cleanup, gets the list of output files for those tasks and delete them. It then deletes the old tasks.
  • Bump NC version number
  • Generate autoload files
  • Implement a taskprocessing:task:cleanup occ command
  • Move the cleanup methods from the bg job class to the manager so they can be used by the command and the bg job

Checklist

@julien-nc julien-nc added this to the Nextcloud 32 milestone Aug 6, 2025
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-task-add-cleanup-flag branch 10 times, most recently from 3a815ed to 8bc4285 Compare August 6, 2025 18:02
@julien-nc julien-nc marked this pull request as ready for review August 6, 2025 18:02
@julien-nc julien-nc requested review from a team and provokateurin as code owners August 6, 2025 18:02
@julien-nc julien-nc requested review from icewind1991 and yemkareems and removed request for a team August 6, 2025 18:02
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-task-add-cleanup-flag branch from 32754d6 to 2367e50 Compare August 6, 2025 22:55
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-task-add-cleanup-flag branch 2 times, most recently from 9ddea45 to 47ffee2 Compare August 7, 2025 09:08
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-task-add-cleanup-flag branch from fe39516 to adabd70 Compare August 7, 2025 13:00
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-task-add-cleanup-flag branch from adabd70 to aa2ca86 Compare August 7, 2025 13:12
@julien-nc julien-nc requested a review from susnux August 8, 2025 09:02
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.

lgtm

@oleksandr-nc
Copy link
Contributor

documentation update: nextcloud/documentation#13500

@DaphneMuller
Copy link

Feedback from @ChristophWurst : Server template was not followed and documentation requirements are lacking

@kesselb kesselb merged commit 64c5200 into master Aug 15, 2025
205 of 211 checks passed
@kesselb kesselb deleted the enh/noid/taskprocessing-task-add-cleanup-flag branch August 15, 2025 07:48
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
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 enhancement feature: text processing pending documentation This pull request needs an associated documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants