修改find_each
This commit is contained in:
parent
d17410489e
commit
91cf27fc3c
|
@ -8,7 +8,7 @@ class SyncUserForgeTask
|
||||||
Rails.logger.info("##########_______sync_start________###########")
|
Rails.logger.info("##########_______sync_start________###########")
|
||||||
all_users = User.where("login is not null").first(1000)
|
all_users = User.where("login is not null").first(1000)
|
||||||
# 这里再把所有用户循环
|
# 这里再把所有用户循环
|
||||||
all_users.find_each do |u|
|
all_users.each do |u|
|
||||||
user_params = u.as_json
|
user_params = u.as_json
|
||||||
user_extension_params = u.try(:user_extensions).as_json || []
|
user_extension_params = u.try(:user_extensions).as_json || []
|
||||||
target_params = []
|
target_params = []
|
||||||
|
|
Loading…
Reference in New Issue