From 2e2b5e28aa6711a549715a3892f062981546c270 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 31 Jul 2017 16:33:43 +0530 Subject: [PATCH] FIX: add slight delay when enqueuing activation email --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 953353916e9..95fa640d613 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -650,7 +650,7 @@ class UsersController < ApplicationController def enqueue_activation_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 def search_users