blob: 67496cee0df9973fdd45bee0de167f5fa3e7d43d (
plain)
1
2
3
4
5
6
7
8
|
namespace :reflex do
desc "Sync data from Reflex api"
task sync: :environment do
sync = StopAreaReferential.find_by(name: 'Reflex').stop_area_referential_syncs.build
raise "reflex:sync aborted - There is already an synchronisation in progress" unless sync.valid?
sync.save if sync.valid?
end
end
|