From f8e9853be38001d406b8aff63a7f13f94ea67885 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Mon, 16 Mar 2020 21:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tasks/sync_user_forge_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tasks/sync_user_forge_task.rb b/app/tasks/sync_user_forge_task.rb index ee5100368..e7708be51 100644 --- a/app/tasks/sync_user_forge_task.rb +++ b/app/tasks/sync_user_forge_task.rb @@ -6,7 +6,7 @@ class SyncUserForgeTask def call Rails.logger.info("##########_______sync_start________###########") - all_users = User.where("login is not null").first(1000) + all_users = User.where("login is not null and mail is not null and type = ?", "User").first(1000) # 这里再把所有用户循环 all_users.each do |u| user_params = u.as_json