view · edit · sidebar · attach · print · history

Index>

20150310-epha-interaction-job

Summary

  • Re-Add epha-interaction import job
  • Adapt gtin2atc to new URL and changed CSV-delimiter

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml

Adapt gtin2atc to new URL and changed CSV-delimiter

Epha changed the CSV-delimiter from '|' to ','. We must make the rake rspec work again.

Done with commit Adapted to changed delimiter

Re-Add epha-interaction import job

Zeno wants that loading a new interaction file from epha leads to an import and that it can be run as a normal import job, too.

As seen in http://dev.ywesee.com/Niklaus/20140826-debug-import-daily we used to load the most uptodate version of epha-interactions at each startup of oddbd. Reverting takes some time, because the unit tests changed quite a lot, too.

Banging my head to figure out, why I get the following error message

Util.log_and_deliver_mail to=["ngiger@ywesee.com"] subject ch.ODDB.org Report - Error: Epha Interaktionen - 03/2015 size 2017 with 0 attachments. Plugin: ODDB::EphaInteractionPlugin
Error: DBI::ProgrammingError
Message: 
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:62:in `rescue in execute'
/usr/local/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:37:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/statement.rb:116:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:263:in `block in ensure_object_connections'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:262:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:262:in `ensure_object_connections'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:553:in `store_object_connections'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:512:in `store'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:274:in `odba_isolated_store'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:395:in `block in odba_store_unsaved'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:392:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:392:in `odba_store_unsaved'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:380:in `odba_store'
/var/www/oddb.org/src/plugin/epha_interactions.rb:76:in `update'
/var/www/oddb.org/src/util/updater.rb:563:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:539:in `call'
/var/www/oddb.org/src/util/updater.rb:539:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:557:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:375:in `update_epha_interactions'
jobs/update_epha_interactions:13:in `block in <module:Util>'

Added an odba_isolated_store and now I get a lot of @@ODBA::Stub was unable to replace Array#33049094 from Hash:#33035078 ODBA::Stub was unable to replace Array#33049094 from Hash:#33035078@@.

After changing the variable name and adding code to delete the old (an Array) and new variable (a Hash), things begin work correctly. But loading the new interactions takes many minutes (> 15).

Things seem to work again. Running Watir tests.

view · edit · sidebar · attach · print · history
Page last modified on March 10, 2015, at 05:41 PM