view · edit · sidebar · attach · print · history

20120229-check-data-float-error-fix-updating-atc_code-email-testenvironment-check-job-mail-oddb_org

<< Masa.20120301-fix-errors-oddb_org | Index | Masa.20120228-check-accessor-Package-Registration-check-parallel-runs-oddb_org >>


  1. Fix updating ATC-Code oddb.org
  2. Check job script sending email process oddb.org
  3. Check error log oddb.org

Commits

Fix updating ATC-Code oddb.org

Problem

Commit

Check job script sending email process oddb.org

Note

  • Job script should run and send an email even if the main application is not running
  • But after the sending an email, the following error will come
/usr/local/lib/ruby/1.9.1/drb/drb.rb:736:in `rescue in block in open': druby://localhost:10000 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> (DRb::DRbConnError)
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:730:in `block in open'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:729:in `each'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:729:in `open'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1192:in `initialize'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1172:in `new'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1172:in `open'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1088:in `block in method_missing'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1106:in `with_friend'
        from /usr/local/lib/ruby/1.9.1/drb/drb.rb:1087:in `method_missing'
        from /home/masa/ywesee/oddb.org/src/util/job.rb:20:in `run'
        from jobs/import_bsv:12:in `<module:Util>'
        from jobs/import_bsv:11:in `<module:ODDB>'
        from jobs/import_bsv:10:in `<main>'
  • This connection error happens because the job process tries to kill the link to cache of the main application
  • But no problem for the data updating

Check error log oddb.org

Refer to Attach:error_log1.20120229.txt

Error

error in SBSM::Session#http_headers: /de/gcc/search/search_type/st_oddb/zone/drugs/search_query/Carmol+Hustentee/currency/USD
NoMethodError
undefined method `values' for "H*":String
/var/www/oddb.org/src/model/sequence.rb:257:in `public_packages'
usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:112:in `method_missing'
ch.oddb> atc_classes.values.map{|atc| atc.sequences.map{|seq| seq.packages.to_s if seq.packages.is_a?(String)} if atc.sequences}.flatten.uniq
-> [nil, "H2", "H*"]
ch.oddb> atc_classes.values.map{|atc| atc.sequences.map{|seq| seq.iksnr.to_s + seq.seqnr.to_s if seq.packages.is_a?(String)} if atc.sequences}.flatten.uniq
-> [nil, "4388901", "6120701", "5949701"]
ch.oddb> atc_classes.values.map{|atc| atc.sequences.map{|seq| seq.odba_id if seq.packages.is_a?(String)} if atc.sequences}.flatten.uniq
-> [nil, 77089, 25647736, 11780537]
ch.oddb> registration('43889').sequence('01').packages.class
-> Hash
ch.oddb> registration('43889').sequence('01').packages.is_a?(String)
-> false
ch.oddb> ODBA.cache.fetch('25647736').packages.class
-> Hash

Note

  • This is strange.
  • If I search the invalid sequence object via 'registration' object or ODBA.cache.fetch, the packages is a Hash
  • but the packages is a String if I search it via 'atc_class' object
ch.oddb> atc_classes.values.map{|atc| atc.sequences.map{|seq| atc.code if seq.packages.is_a?(String)} if atc.sequences}.flatten.uniq
-> [nil, "A16AZ", "N05CZ", "R05CA10"]
ch.oddb> atc_class('A16AZ').sequences.map{|seq| seq.packages.to_s if seq.packages.is_a?(String)}.uniq
-> [nil, "H2"]
ch.oddb> atc_class('A16AZ').sequences[29].packages.class
-> String
ch.oddb> atc_class('A16AZ').sequences[29].packages
-> H2
ch.oddb> atc_class('A16AZ').sequences.map{|seq| seq.packages.to_s if seq.packages.is_a?(String)}.uniq
-> [nil, "H2"]
  • Question: Is it possible to be a different object even if the odba_id is same
ch.oddb> atc_class('A16AZ').sequences[29].odba_id
-> 77089
ch.oddb> registration('43889').sequence('01').odba_id
-> 77089
ch.oddb> atc_class('A16AZ').sequences[29].packages.class
-> String
ch.oddb> atc_class('A16AZ').sequences[29].packages
-> H2
ch.oddb> registration('43889').sequence('01').packages.class
-> Hash
ch.oddb> registration('43889').sequence('01').packages
-> {"028"=>#<ODBA::Stub:85543860#239815 @odba_class=ODDB::Package @odba_container=98246420#105071>}

Note

  • These are gone after reboot, so it is caused by probably the cache data floating
  • Temporary solution
    • we should skip the invalid data in the view process, and wait the cache data is corrected after some time or rebooting
    • fix the data floating error one by one

Commit

Refer to Attach:error_log2.20120229.txt

Commit

Refer to Attach:error_log3.20120229.txt

Commit

Refer to Attach:error_log4.20120229.txt

Commit

Refer to Attach:error_log5.20120229.txt

Commit

Refer to Attach:error_log6.20120229.txt

Commit

Refer to Attach:error_log7.20120229.txt

Commit

Refer to Attach:error_log8.20120229.txt

Commit

Refer to Attach:error_log9.20120229.txt

Commit

view · edit · sidebar · attach · print · history
Page last modified on February 29, 2012, at 07:47 PM