Skip to content

Commit a5c9cfd

Browse files
jcoynethatbudakguy
authored andcommitted
Avoid forking to run indexer
1 parent 035d977 commit a5c9cfd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tasks/arclight.rake

+7-5
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,17 @@ namespace :arclight do
5757
task :seed do
5858
puts 'Seeding index with data from spec/fixtures/ead...'
5959
Dir.glob('spec/fixtures/ead/*.xml').each do |file|
60-
system("FILE=#{file} rake arclight:index") # no REPOSITORY_ID
60+
# no REPOSITORY_ID
61+
ENV['FILE'] = file
62+
Rake::Task['arclight:index'].invoke
6163
end
6264
Dir.glob('spec/fixtures/ead/*').each do |dir|
6365
next unless File.directory?(dir)
6466

65-
system("REPOSITORY_ID=#{File.basename(dir)} " \
66-
'REPOSITORY_FILE=spec/fixtures/config/repositories.yml ' \
67-
"DIR=#{dir} " \
68-
'rake arclight:index_dir')
67+
ENV['REPOSITORY_ID'] = File.basename(dir)
68+
ENV['REPOSITORY_FILE'] = 'spec/fixtures/config/repositories.yml'
69+
ENV['DIR'] = dir
70+
Rake::Task['arclight:index_dir'].invoke
6971
end
7072
end
7173
end

0 commit comments

Comments
 (0)