mirror of
https://github.com/Evolix/chexpire.git
synced 2024-05-04 01:35:10 +02:00
Upgrade Task for setting manual mode for domain non supported
This commit is contained in:
parent
3cbf0e2656
commit
6ccddc6afc
14
lib/tasks/one_shot.rake
Normal file
14
lib/tasks/one_shot.rake
Normal 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
|
Loading…
Reference in a new issue