Skip to content

Fixes #39278 - Add rake task to clean all notifications#10970

Merged
stejskalleos merged 1 commit into
theforeman:developfrom
ATIX-AG:fix_39278
May 11, 2026
Merged

Fixes #39278 - Add rake task to clean all notifications#10970
stejskalleos merged 1 commit into
theforeman:developfrom
ATIX-AG:fix_39278

Conversation

@sbernhard
Copy link
Copy Markdown
Contributor

Introduces UINotifications::CleanAll service and the notifications:clean_all rake task which removes all notifications, optionally filtered by blueprint name, without requiring them to be expired first.

Comment thread app/services/ui_notifications/clean_all.rb
@sbernhard
Copy link
Copy Markdown
Contributor Author

@stejskalleos can you please have a look at this PR?

@stejskalleos stejskalleos self-assigned this May 5, 2026
@nadjaheitmann
Copy link
Copy Markdown
Contributor

nadjaheitmann commented May 6, 2026

I tested it and looks fine to me:

foreman-rake notifications:clean_all['tasks_paused_admin']
Starting full notifications clean up for blueprint 'tasks_paused_admin'...
Finished, cleaned 1 notifications

Works fine. I don't know what is the usual way to know how to get those blueprints so I had to dig a bit :)

nadjaheitmann
nadjaheitmann previously approved these changes May 6, 2026
Copy link
Copy Markdown
Contributor

@stejskalleos stejskalleos left a comment

Choose a reason for hiding this comment

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

few comments, tests looks good

Comment thread app/services/ui_notifications/clean_all.rb Outdated
Comment thread app/services/ui_notifications/clean_all.rb
Comment thread app/services/ui_notifications/clean_all.rb Outdated
Comment thread app/services/ui_notifications/clean_all.rb
Introduces UINotifications::CleanAll service and the
notifications:clean_all rake task which removes all notifications,
optionally filtered by blueprint name, without requiring them to be
expired first.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@stejskalleos stejskalleos merged commit 96f155a into theforeman:develop May 11, 2026
23 checks passed
@stejskalleos
Copy link
Copy Markdown
Contributor

🍏 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants