Small delay before sync dates at creation

This commit is contained in:
Colin Darie 2018-07-05 17:25:13 +02:00
parent ff9d440b2c
commit 3de56c09cc
No known key found for this signature in database
GPG Key ID: 4FB865FDBCA4BCC4
1 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,10 @@ class Check < ApplicationRecord
return unless active?
return unless saved_changes.key?("domain")
WhoisSyncJob.perform_later(id) if domain?
SSLSyncJob.perform_later(id) if ssl?
# small delay before first sync, otherwise on fast system
# the db won't return the check immediately after insert
WhoisSyncJob.perform_later(id, delay: 1.second) if domain?
SSLSyncJob.perform_later(id, delay: 1.second) if ssl?
end
def reset_notifications