1
0
Fork 0
oldhaven/lib/tasks/db_import.rake

13 lines
372 B
Ruby

namespace :db do
desc 'Imports test data from MusicBrainz database'
task :import, [:name, :dry_run] => :environment do |t, argv|
if argv[:dry_run].nil? or argv[:dry_run] == "true"
argv[:dry_run] = true
else
argv[:dry_run] = false
end
unless argv[:name].nil?
ImportController.importArtist(argv[:name], argv[:dry_run])
end
end
end