view · edit · sidebar · attach · print · history

20130709-update-oddb2xml-zurrose-option

<< 20130710-add-prodno-oddb-article-xml-debug-editing-davatz-com | 2013 | 20130708-add-oddb2xml-zurrose-option-debug-ch-oddb-org-jobs-failures >>


Summary

  • Update zurrose price tag and format
  • Fixed bugs on oddb_fi.xml and oddb_fi_product.xml

Commits / Patches

Index / Status


Update oddb2xml zurrose option behavior

  • Update to add zurrose price, not replace.
  • Update datetime format for ZURROSE
    <ARTPRI>
      <VDAT>01.03.2010</VDAT>
      <PTYP>PEXF</PTYP>
      <PRICE>14.18</PRICE>
    </ARTPRI>
    <ARTPRI>
      <VDAT>01.03.2010</VDAT>
      <PTYP>PPUB</PTYP>
      <PRICE>28.55</PRICE>
    </ARTPRI>
    <ARTPRI>
      <VDAT>09.07.2013</VDAT>
      <PTYP>ZURROSE</PTYP>
      <PRICE>15.77</PRICE>
    </ARTPRI>
commit

Missing MONIDs in oddb_fi_product.xml

This is bug. some @products does not have Sequence (:seq).
oddb2xml had skipped these products at oddb_fi_product.xml creation.

@products base:

[19] 1.9.3-p429(#<Oddb2xml::Builder>)> @infos["de"].select{|o| o[:monid] == "57813" }.length
=> 1
[20] 1.9.3-p429(#<Oddb2xml::Builder>)> @products.select{|o| o[:seq] }.select{|o| o[:seq][:swissmedic_number5] == "57813" }.length
=> 0

@infos base:

[27] 1.9.3-p429(#<Oddb2xml::Builder>)> @products.select{|o| o[:no8] =~ /^57813/ }.length
=> 1

Then updated Builder for oddb_fi_product.xml.

[54] 1.9.3-p429(#<Oddb2xml::Builder>)> @products.group_by{|o| o[:no8][0..4] }.values.select{|o| o.select{|n| n[:ean].nil? }.length > 0 }.length
=> 0
% grep -r 57813 oddb_fi_product.xml
    <GTIN>7680485781361</GTIN>
    <MONID>57813</MONID>
    <GTIN>7680578130014</GTIN>

% grep -r 57813 oddb_fi.xml        
    <monid>57813</monid>
    <p class="noSpacing">57813 (Swissmedic).</p>
    <monid>57813</monid>
    <p class="noSpacing">57813 (Swissmedic).</p>
commit

Update oddb_fi.xml to use grouped by monid

[7] 1.9.3-p429(#<Oddb2xml::Builder>)> @infos[lang].uniq {|i| i[:monid] }.length
=> 2782
[8] 1.9.3-p429(#<Oddb2xml::Builder>)> @infos[lang].length
=> 3243

Updated to add with grouped monid (swissmedicno5)
then oddb_fi.xml has 2 entries (DE and FR)

% cat oddb_fi.xml | grep "<monid>" | sort | uniq -c | less
      2     <monid>56881</monid>
      2     <monid>56885</monid>
      2     <monid>56891</monid>
      2     <monid>56892</monid>
      2     <monid>56893</monid>
      2     <monid>56895</monid>
      2     <monid>56898</monid>
      2     <monid>56900</monid>
      2     <monid>56901</monid>
....
commit

Debug exportd error

Maybe to few seep for EXPORTD before this job.

exportd error comes again

Error: DRb::DRbConnError
Message: druby://localhost:10005 - #<Errno::ECONNREFUSED: Connection refused - connect(2)>
Backtrace:
/usr/local/lib/ruby/1.9.1/drb/drb.rb:736:in `rescue in block in open'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:730:in `block in open'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:729:in `each'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:729:in `open'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1191:in `initialize'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1171:in `new'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1171:in `open'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1105:in `with_friend'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1086:in `method_missing'
/var/www/oddb.org/src/plugin/csv_export.rb:160:in `export_index_therapeuticus'
/var/www/oddb.org/src/util/exporter.rb:161:in `block in export_index_therapeuticus_csv'
/var/www/oddb.org/src/util/exporter.rb:435:in `call'
suspend
view · edit · sidebar · attach · print · history
Page last modified on June 14, 2016, at 05:07 PM