Upgrade Task for setting manual mode for domain non supported

This commit is contained in:
Colin Darie 2018-08-29 17:42:27 +02:00
parent 3cbf0e2656
commit 6ccddc6afc
No known key found for this signature in database
GPG Key ID: 4FB865FDBCA4BCC4
1 changed files with 14 additions and 0 deletions

14
lib/tasks/one_shot.rake Normal file
View File

@ -0,0 +1,14 @@
namespace :one_shot do
desc "Set manual mode for unsupported checks"
task reset_checks_modes: :environment do
Check.domain.find_each do |check|
check.mode = if check.supported?
:auto
else
:manual
end
check.save(validate: false)
end
end
end