FIX: add slight delay when enqueuing activation email

This commit is contained in:
Arpit Jalan 2017-07-31 16:33:43 +05:30
parent c7f76aa554
commit 2e2b5e28aa
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ class UsersController < ApplicationController
def enqueue_activation_email def enqueue_activation_email
@email_token ||= @user.email_tokens.create(email: @user.email) @email_token ||= @user.email_tokens.create(email: @user.email)
Jobs.enqueue(:critical_user_email, type: :signup, user_id: @user.id, email_token: @email_token.token) Jobs.enqueue_in(1.second, :critical_user_email, type: :signup, user_id: @user.id, email_token: @email_token.token)
end end
def search_users def search_users