Use touch_all with batches (#32799)
				
					
				
			This commit is contained in:
		@@ -12,7 +12,7 @@ class UnallowDomainService < BaseService
 | 
			
		||||
  private
 | 
			
		||||
 | 
			
		||||
  def suspend_accounts!(domain)
 | 
			
		||||
    Account.where(domain: domain).in_batches.update_all(suspended_at: Time.now.utc)
 | 
			
		||||
    Account.where(domain: domain).in_batches.touch_all(:suspended_at)
 | 
			
		||||
    AfterUnallowDomainWorker.perform_async(domain)
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user