move constants to methods

This commit is contained in:
Oleg Hasjanov 2021-07-05 16:31:44 +03:00
parent f7a5e21db0
commit 6b6a41ae20
2 changed files with 15 additions and 6 deletions

View file

@ -1,9 +1,13 @@
FILE_NAME = './ettevotja_rekvisiidid_init.csv'.freeze
namespace :collect_csv_data do
desc 'Import from csv registry business contact into BusinessRegistryContact model'
task business_contacts: :environment do
ScanCsvRegistryBusinnesContactsJob.perform_later(FILE_NAME)
ScanCsvRegistryBusinnesContactsJob.perform_later(filename)
end
private
def filename
'./ettevotja_rekvisiidid_init.csv'
end
end