21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-05 18:25:09 +02:00

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

View file

@ -100,8 +100,10 @@ class Check < ApplicationRecord
return unless active? return unless active?
return unless saved_changes.key?("domain") return unless saved_changes.key?("domain")
WhoisSyncJob.perform_later(id) if domain? # small delay before first sync, otherwise on fast system
SSLSyncJob.perform_later(id) if ssl? # 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 end
def reset_notifications def reset_notifications