0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-11 02:59:07 +08:00
discourse/app/jobs
Steven Chang 39f73fb398
DEV: add clean_up_inactive_users_query modifier for plugins to extend query for inactive users (#41372)
This PR adds Bookmarks and PostActions (likes) to the query for
`CleanUpInactiveUsers` to fetch qualified users.

This PR also allows plugins to modify the `CleanUpInactiveUsers` job
query for selecting which users to destroy. The modifier is given the AR
relation as the argument. Plugins should avoid executing the query, as
it expects a builder style pattern.

Implementation:
```ruby
register_modifier(:clean_up_inactive_users_query) do |relation|
  relation.where.missing(:table_name)
end
```
2026-07-06 09:39:11 -07:00
..
concerns DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
onceoff DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
regular FIX: re-validate permissions when running CSV export job (#41464) 2026-07-06 16:50:06 +05:30
scheduled DEV: add clean_up_inactive_users_query modifier for plugins to extend query for inactive users (#41372) 2026-07-06 09:39:11 -07:00
base.rb DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00