view · edit · sidebar · attach · print · history

20130911-export_index_therapeuticus_csv-3

<< | Index | >>


Summary

  • Fix export_index_therapeuticus_csv
  • UnitTest show problem in src/view/notify.rb

Commits

Index


UnitTest show problem in src/view/notify.rb

Running (a slightly modified version of ) test/test_view/notify.rb provokes the following error

  4) Error:
test_notify_item__package(ODDB::View::TestNotifyMail):
NameError: uninitialized constant ODDB::Migel
    /opt/src/oddb.org/src/view/notify.rb:85:in `notify_item'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:68:in `create'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p448/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
    test/test_view/notify.rb:117:in `new'
    test/test_view/notify.rb:117:in `setup'

I still don't know whether we come through line 85 in production or not. There must have been once (but when?) be a reorganistion of migel as src/model/sequence.rb contains

module ODDB
  module Migel
    class Item
      # This is necessary because maybe some old migel item object remain somewhere in the cache
    end
  end

The model of migel however lives in a separate Namespace Migel, see e.g src/remote/migel/model_super.rb

After discussion with Zeno it is clear, that obsolete Migel tests and source code should be eliminated as Migel is now a separate module.

Pushed a few commits to bring the errors and failures on travis down.

Fix export_index_therapeuticus_csv

Running the export_dailay without restart did not lead to any problems. The log entries showed up in /var/log/messages and /var/www/oddb.org/log/oddb/debug/2013/09.log. Preparing a commit with only one restart after completing all exports. Running it on my VM and on thinpower (where I would like to catch the UTF-8 problem, too).

Begins to look good on thinpower. As output of export_daily I get

<..>
2013-09-11 09:43:21 +0200: safe_export Mail Patinfo-Invoices starting
2013-09-11 10:11:01 +0200: safe_export Mail Patinfo-Invoices completed
2013-09-11 10:11:01 +0200: safe_export Mail Fachinfo-Invoices starting
2013-09-11 10:34:27 +0200: safe_export Mail Fachinfo-Invoices completed
2013-09-11 10:34:27 +0200: safe_export sl_pcodes.txt starting
2013-09-11 10:38:13 +0200: safe_export sl_pcodes.txt completed
2013-09-11 10:38:14 +0200: safe_export oddb.csv starting
2013-09-11 11:02:20 +0200: safe_export oddb.csv completed
2013-09-11 11:02:20 +0200: safe_export oddb2.csv starting
2013-09-11 11:05:05 +0200: safe_export oddb2.csv completed
2013-09-11 11:05:05 +0200: safe_export doctors.csv starting
2013-09-11 11:10:00 +0200: safe_export doctors.csv completed
2013-09-11 11:10:00 +0200: safe_export index_therapeuticus starting
/var/www/oddb.org/ext/export/bin/exportd 2013-09-11 09:41:09 +0200 started
could not find htmlgrid.so, falling back to pure-ruby class
/var/www/oddb.org/ext/export/bin/exportd 2013-09-11 09:42:38 +0200 started service
2013-09-11 11:15:00 +0200: safe_export index_therapeuticus completed
2013-09-11 11:15:00 +0200: safe_export price_history.csv starting
2013-09-11 11:35:32 +0200: safe_export price_history.csv completed
2013-09-11 11:35:32 +0200: restart_export_server. Called from /var/www/oddb.org/src/util/exporter.rb:81:in `run'
sh: -c: Zeile 0: Dateiende beim Suchen nach ``' erreicht.
sh: -c: Zeile 1: Syntax Fehler: Unerwartetes Dateiende.

Fixed the problem with the log entry of restart_export_server.

The export of doctors.csv completed without any UTF-8 problem. The file /var/www/oddb.org/data/downloads/doctors.csv is 5.5 MB big and contains 34664 lines. (Zeno was right. There was no need to restart the oddbd process.). Restarted normal processing of exportd using svc -u /service/ch.oddb-exporter

Also the other files at /var/www/oddb.org/data/downloads/ look quite nice.

Waiting for export_daily to complete. Exportd uses about 796 MB at 11:30. (On my VM after two runs of export_daily it was at around 1000MB). On thinpower restored original versions with git checkout ext/export/bin/exportd src/util/exporter.rb

Pushed commit Cleanup restarting exportd

view · edit · sidebar · attach · print · history
Page last modified on September 16, 2013, at 08:52 AM