< Niklaus.20141215-fix-hospital | 2014 | Niklaus.20141209-import-atc-code >>
---
Pushed commits
Started importers in two different screens on oddb-ci2 with bin/medreg company and bin/medreg persons.
I think I found the culprit. For HPC the first link matching the text '1' is '1', whereas for reccalls it is 'Archive 2003-2012'. Trying to find a better way.
Now I find in the log/oddb/debug/2014/12.log the following entries
2014-12-10 08:31:52 UTC rss adding current issue: 2014-12-03 Chargenrückruf / Meropenem-Teva 500 mg und 1 g, Pulver zur Herstellung einer Injektions- oder Infusionslösung 2014-12-10 08:31:52 UTC rss adding new entry: 2014-12-03 Chargenrückruf / Meropenem-Teva 500 mg und 1 g, Pulver zur Herstellung einer Injektions- oder Infusionslösung 2014-12-10 08:31:52 UTC rss adding new entry: 2014-11-28 Chargenrückruf / Feniallerg, Injektionslösung 2014-12-10 08:31:52 UTC rss adding new entry: 2014-11-27 Chargenrückruf / Sanalepsi N, Tropfen 2014-12-10 08:31:52 UTC rss adding new entry: 2014-11-21 Chargenrückruf / Prolutex, Injektionslösung 2014-12-10 08:31:53 UTC rss adding new entry: 2014-11-19 Chargenrückruf / Omeprazol Sandoz eco 20mg, Filmtabletten 2014-12-10 08:31:53 UTC rss adding new entry: 2014-10-24 Chargenrückruf / Zovirax Augensalbe 2014-12-10 08:31:53 UTC rss adding new entry: 2014-10-15 Chargenrückruf / Epaxal, Injektionssuspension 2014-12-10 08:31:53 UTC rss adding new entry: 2014-10-13 Chargenrückruf / Torisel, Konzentrat zur Herstellung einer Infusionslösung 2014-12-10 08:31:54 UTC rss adding new entry: 2014-10-09 Chargenrückruf / Donepezil-Mepha 5 mg / 10 mg, Lactab 2014-12-10 08:31:54 UTC rss adding new entry: 2014-10-06 Chargenrückruf / Kiovig, Infusionslösung
but accessing http://oddb-ci2.dyndns.org/de/gcc/rss/channel/recall.rss returns a resources/errors/appdown.html
Looking at log/oddb/error_log I find
[Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: Wed Dec 10 10:06:38 +0100 2014 - 70318592335080 - Errno::ENOENT - No such file or directory - /var/www/oddb.org/data/rss/de/recall.rss [Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/request.rb:180:in `size' [Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/request.rb:180:in `drb_process' [Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/request.rb:66:in `process' [Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: /var/www/oddb.org/doc/index.rbx:21 [Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `load' [Wed Dec 10 10:06:38 2014] [error] access to /de/gcc/rss/channel/recall.rss failed for (null), reason: /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `handler'
Copied maually from thinpower /var/www/oddb.org/data/rss/de/recall.rss to oddb-ci2. Now at least I see the feeds as before.
But I must rework the nested loops to get the content in a reliable way. Found a solution. Making the unit tests work require more work than expected. My final solution was:
flexmock(@plugin) do |plug| plug.should_receive(:open).with(filename).and_return(content)) end
mechanize = flexmock("mechanize") mechanize.should_receive(:get).with(url).and_return(content) @plugin.agent= mechanize
See test/test_plugin/rss.rb. Pushed commit Fix recall
Zeno remarked that various recalls were added several times. Pushed commit Don't add recall/hpc entries twice