VRFS-3644 added test against MAX_TRACKS environment variable to limit quantity of jam tracks imported from production.
This commit is contained in:
parent
79c70e00cb
commit
3df404422d
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue