Fix stale user highest role stats on dormant user deactivation
The dormant user deactivation worker has not been triggering an update to the user role stats. This fix replaces the SQL statement with a batched deactivation via the User model. Changelog: fixed
显示
- app/models/user.rb 1 个添加, 0 个删除app/models/user.rb
- app/workers/users/deactivate_dormant_users_worker.rb 8 个添加, 28 个删除app/workers/users/deactivate_dormant_users_worker.rb
- db/post_migrate/20220802204737_remove_deactivated_user_highest_role_stats.rb 27 个添加, 0 个删除...20802204737_remove_deactivated_user_highest_role_stats.rb
- db/schema_migrations/20220802204737 1 个添加, 0 个删除db/schema_migrations/20220802204737
- spec/lib/gitlab/database/migrations/background_migration_helpers_spec.rb 0 个添加, 6 个删除.../database/migrations/background_migration_helpers_spec.rb
- spec/migrations/20220802204737_remove_deactivated_user_highest_role_stats_spec.rb 39 个添加, 0 个删除...204737_remove_deactivated_user_highest_role_stats_spec.rb
- spec/workers/users/deactivate_dormant_users_worker_spec.rb 11 个添加, 10 个删除spec/workers/users/deactivate_dormant_users_worker_spec.rb
加载中
想要评论请 注册 或 登录