lib/motor/tasks/motor.rake in motor-admin-0.2.76 vs lib/motor/tasks/motor.rake in motor-admin-0.2.77
- old
+ new
@@ -19,9 +19,18 @@
Motor::Configs::SyncFromFile.call(with_exception: true)
puts '✅ configs have been loaded from configs/motor.yml'
end
+ task reload: :environment do
+ ActiveRecord::Base.transaction do
+ Motor::Configs.clear
+ Motor::Configs::SyncFromFile.call(with_exception: true)
+ end
+
+ puts '✅ configs have been loaded from configs/motor.yml'
+ end
+
desc 'Synchronize configs with remote application'
task sync: :environment do
remote_url = ENV['MOTOR_SYNC_REMOTE_URL']
api_key = ENV['MOTOR_SYNC_API_KEY']