This commit is contained in:
sylor_huang@126.com 2020-03-17 16:05:46 +08:00
parent e0fd9409d0
commit 28802cb833
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,6 @@ class SyncForgeJob < ApplicationJob
if new_user.present? if new_user.present?
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin begin
Watcher&.where(user_id: user_old_id).update_all(user_id: new_user.id) Watcher&.where(user_id: user_old_id).update_all(user_id: new_user.id)
ProjectTrend&.where(user_id: user_old_id).update_all(user_id: new_user.id) ProjectTrend&.where(user_id: user_old_id).update_all(user_id: new_user.id)
sync_roles(roles_params, platform) sync_roles(roles_params, platform)
@ -41,12 +40,12 @@ class SyncForgeJob < ApplicationJob
end end
end end
rescue Exception => e rescue Exception => e
Rails.logger.info("#######_________user__sync__failed__#########{e}") Rails.logger.info("#######_______forge_new_user_sync_failed___#########{e}")
raise ActiveRecord::Rollback raise ActiveRecord::Rollback
end end
end end
else else
Rails.logger.info("############___________________########{user_old_id}创建失败") Rails.logger.info("############____forge_new_user_create_failed_____#######old_user_id:-#{user_old_id}")
end end
end end
end end

View File

@ -1,6 +1,7 @@
:concurrency: <%= ENV["sidekiq_threads"] || 20 %> :concurrency: <%= ENV["sidekiq_threads"] || 20 %>
:pidfile: tmp/pids/sidekiq.pid :pidfile: tmp/pids/sidekiq.pid
:logfile: log/sidekiq.log :logfile: log/sidekiq.log
:timeout: 30
:queues: :queues:
- [default, 3] - [default, 3]
- [searchkick, 10] - [searchkick, 10]