discourse/spec/fabricators/user_custom_field_fabricator.rb
Natalie Tay 00a9369ca2
FIX: Move user reindexing into a job (#26753)
In a large forum with millions of users and millions of user_fields
updating the list of dropdown user field options will result in a
502 now due to the large number of fields.

This commit moves the indexing into a job.
2024-04-25 20:58:34 +08:00

8 lines
162 B
Ruby

# frozen_string_literal: true
Fabricator(:user_custom_field) do
user
name { Fabricate(:user_field).id }
value { sequence(:value) { |n| "value#{n}" } }
end