lib/oddb2xml/cli.rb in oddb2xml-2.2.4 vs lib/oddb2xml/cli.rb in oddb2xml-2.2.5
- old
+ new
@@ -22,11 +22,10 @@
Oddb2xml.save_options(@options)
@mutex = Mutex.new
# product
@items = {} # Items from Preparations.xml in BAG, using GTINs as key
@refdata_types = {} # Base index from refdata
- @flags = {} # narcotics flag files repo
@lppvs = {} # lppv.txt from files repo
@infos = {} # [option] FI from SwissmedicInfo
@packs = {} # [option] Packungen from Swissmedic for dat
@infos_zur_rose = {} # [addition] infos_zur_rose and other infos from zurrose transfer.txt
@migel = {} # [addition] additional Non Pharma products from files repo
@@ -61,11 +60,10 @@
if @options[:nonpharma]
threads << download(:migel) # oddb2xml_files
end
threads << download(:zurrose)
threads << download(:package) # swissmedic
- threads << download(:bm_update) # oddb2xml_files
threads << download(:lppv) # oddb2xml_files
threads << download(:bag) # bag.e-mediat
types.each do |type|
threads << download(:refdata, type) # refdata
end
@@ -224,20 +222,9 @@
Oddb2xml.log("SwissmedicDownloader package #{bin} #{File.size(bin)} bytes")
@mutex.synchronize do
@packs = SwissmedicExtractor.new(bin, :package).to_hash
Oddb2xml.log("SwissmedicExtractor added #{@packs.size} packs from #{bin}")
@packs
- end
- end
- when :bm_update
- begin # instead of Thread.new do
- downloader = BMUpdateDownloader.new
- str = downloader.download
- Oddb2xml.log("BMUpdateDownloader str #{str.size} bytes")
- @mutex.synchronize do
- @flags = BMUpdateExtractor.new(str).to_hash
- Oddb2xml.log("BMUpdateExtractor added #{@flags.size} flags")
- @flags
end
end
when :lppv
begin # instead of Thread.new do
downloader = LppvDownloader.new