VRFS-3644 added test against MAX_TRACKS environment variable to limit quantity of jam tracks imported from production.

This commit is contained in:
Brian T. Smith 2016-01-03 22:30:22 -06:00
parent 79c70e00cb
commit 3df404422d
1 changed files with 14 additions and 2 deletions

View File

@ -2868,6 +2868,17 @@ module JamRuby
end
end
def import_count_exceeded?(count)
max = ENV['MAX_TRACKS']
begin
if Integer(max) <= count
return true
end
rescue
end
return false
end
def synchronize_all(options)
importers = []
@ -2883,9 +2894,10 @@ module JamRuby
count+=1
end
if count > 500
#break
if import_count_exceeded?(count)
break
end
end