view · edit · sidebar · attach · print · history

Index>

20150202-migel-login

Summary

  • atc_less job should get longer ATC-code from swissindex
  • Fix Migel update

Commits

migel

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.
  • Display 10 recalls not only those from this month
  • Import via data/medreg_companies.yaml

---

atc_less job should get longer ATC-code from swissindex

The atc_less jobs need two small modifications:

  • Call rebuild atc_cless index after the update
  • If we find a longer ATC code from swissindex we take that one

Running corrected job atc_less via swissmedic_followers. It took 3,5 minutes to be rebuilt.

Looking at the received mail I find inconsistent results: eg.

440 ATC code taken from swissindex where they are longer
  00282/01 J06AA99 -> J06AA99
  00288/01 J06AA99 -> J06AA99
<..>
 41080/03 N02 -> M02AC

Okay. I found the error compared the code from swissindex to the one from swissmedic and not to that from the database. Corrected. Rerunning the import again. Fix is not correct as an atc_code from swissindex gets overriden by the one from swissmedic. Distinguish in the report between nr_atc_code_from_swissmedic and nr_atc_code_from_swissindex. Now it looks better. Redoing import again, as now everything should be okay.

Pushed commits:

Started jobs/update_atc_less in a screen on thinpower.

new link for migel

Must adapt the new link and putting it into /var/www/migel/etc/migel.yml

Fix Migel update

Migel-Update does not work anymore as it should.

Last good update was

---------- Forwarded message ----------
From:  <admin@ywesee.com>
Date: 2014-06-03 3:22 GMT+02:00
Subject: Tue Jun  3 02:55:22 2014: migel
Migel::Util::Importer#reported_save_all_products(fr)
To:


Tue Jun  3 02:55:22 2014: migel
Migel::Util::Importer#reported_save_all_products(fr)
Saved file: /var/www/migel/data/csv/migel_product_fr.csv
Total   557 Migelids (  375 Migelids have products /   182 Migelids
have no products)
Saved 32187 Products

Migelids with products (375)
http://ch.oddb.org/fr/gcc/migel_search/migel_product/010101001
<...>
Migelids without products (182)
http://ch.oddb.org/fr/gcc/migel_search/migel_product/010102012
<..>

It contained also one attachement migel_products_fr.csv.gz

Looking at my E-Mails I found one which looked like this

Thu Sep  4 08:06:24 2014: migel Migel::Util::Importer#reported_save_all_products(de)
Saved file: /var/www/migel/data/csv/migel_products_de.csv
Total   567 Migelids (  375 Migelids have products /   192 Migelids have no products)
Saved 32187 Products

Migelids with products (375)
http://ch.oddb.org/de/gcc/migel_search/migel_product/010101001

It had also an attachment migel_products_de.csv.gz which was about 460 kB big.

I find however the following commit of mine which was not pushed

commit c1236037439852837180e4f155482ea6d4cef1d8
Author: Niklaus Giger <niklaus.giger@member.fsf.org>
Date:   Thu Sep 4 08:06:09 2014 +0200

    Avoid nil error when migel id/group/subgroup is empty

Running unchanged jobs/update_migel_products_with_report to see what happens. See that it downloaded the file -rw-r--r-- 1 apache apache 8192207 2. Feb 14:16 data/xml/XMLSwissindexNonPharma-DE-latest.xml

The big difference I have between thinpower and oddb-ci2 is that on thinpower a different database migel is used.

I found probably the culprit in lib/migel/plugin/swissindex.rb I return migel_codes_without_products instad of the @migel_codes_without_products.

But another problem is that the migel job calls ch.oddb-swissindex_pharma to get the content for the Migel-items.

For oddbd we use an old version of Savon (0.9.7) which is used to get the ZSR and Swissindex. The actual Savon version 2.9.0 would make testing a lot easier.

Found an easy way to add simple check that our new base_url works. Pushed commit Make migel base_url configurabl.

Pushed two commits for migel, too:

Pulling changes to thinpower. Restarting ch-oddbd* and starting migel import

view · edit · sidebar · attach · print · history
Page last modified on February 02, 2015, at 04:30 PM