Closed zdavatz closed 2 years ago
on thinpower the commit 79ae1057ce6f9208279774494ef86fb24d68aebd "(#151) Use https for refdata update companies and persons" is missing.
So https
is not working for the Pharma
download yet?
Nein, das ist für refdata_nat und refdata_jur (aka persons and companies)
Ok, wir brauchen es auch für Pharma
.
Auf thinpower findet man -rw-r--r-- 1 apache apache 3460 1. Apr 18:42 /var/www/oddb.org/log/oddb/debug/update_package_trade_status.log
und via
tail /var/www/oddb.org/log/oddb/debug/update_package_trade_status.log
0,0,0,0 7680669030025 27 / 20188 Estimate total: 202.71 [h] It will be done in: 202.44 [h]
0,0,0,0 7680667700012 28 / 20188 Estimate total: 201.49 [h] It will be done in: 201.21 [h]
0,0,0,0 7680669970017 29 / 20188 Estimate total: 200.36 [h] It will be done in: 200.07 [h]
0,0,0,0 7680669970024 30 / 20188 Estimate total: 199.30 [h] It will be done in: 199.00 [h]
0,0,0,0 7680662610019 31 / 20188 Estimate total: 198.30 [h] It will be done in: 198.00 [h]
0,0,0,0 7680662610040 32 / 20188 Estimate total: 197.37 [h] It will be done in: 197.06 [h]
0,0,0,0 7680662610057 33 / 20188 Estimate total: 196.50 [h] It will be done in: 196.18 [h]
0,0,0,0 7680667860013 34 / 20188 Estimate total: 195.68 [h] It will be done in: 195.35 [h]
0,0,0,0 7680664470017 35 / 20188 Estimate total: 194.90 [h] It will be done in: 194.56 [h]
0,0,0,0 7680664470024 36 / 20188 Estimate total: 194.17 [h] It will be done in: 193.82 [h]
Aus irgendeinem Grund ist import extrem langsam geworden. Weshalb?
Kann die Datei XMLRefdataPharma
jetzt runtergeladen werden?
Nein, der code funktioniert hier anders. Siehe ext/refdata/src/refdata.rb. Es wird immer nur nach einem GTIN gesucht via:
XMLRefdataPharma kommt via src/plugin/atc_less.rb hinein, was beim update_swissmedic_followers (nicht aber aber bei bsv_followers) noch vor dem update_package_trade_status_by_refdata kommt.
Ok, aber trotzdem wird XMLRefdataPharma
nicht mehr runtergeladen?
Starte im screen import_swissmed sudo -u apache bundle-300 exec ruby-300 jobs/update_atc_less
. Dann sollte das bald mal kommen.
Wozu brauchen wir den Job update_refdata
? Der war doch nur dazu da, um den Pharmacode zu holen, oder?
Ok, XMLRefdataPharma
wurde nicht runtergeladen und es kommt folgender Error:
INDEX CREATION ERROR:
undefined method `load_documents' for Psych:Module
Did you mean? load_stream
/var/www/oddb.org/src/util/oddbapp.rb:1355:in `rebuild_indices'
/var/www/oddb.org/src/util/oddbapp.rb:1497:in `block in method_missing'
/var/www/oddb.org/src/util/oddbapp.rb:1496:in `synchronize'
/var/www/oddb.org/src/util/oddbapp.rb:1496:in `method_missing'
/var/www/oddb.org/src/plugin/atc_less.rb:189:in `update_atc_codes'
/var/www/oddb.org/src/util/updater.rb:504:in `update_immediate'
/var/www/oddb.org/src/util/updater.rb:401:in `update_atc_less'
jobs/update_atc_less:14:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:41:in `run'
jobs/update_atc_less:12:in `<module:Util>'
jobs/update_atc_less:11:in `<module:ODDB>'
jobs/update_atc_less:10:in `<main>'
Habe dieses Problem von Hand auf thinpower geflickt und jobs/update_atc_less neu gestartet. Ich glaube, dieser Fehler tritt nicht auf, wenn atc_less via swissmedic_followers aufgerufen wird.
Ich denke nicht, denn ich habe atc_less
nie alleine laufen lassen, seit Januar 2022. Ich sehe noch keine runtergeladene Datei XMLRefdataPharma
. Ah, Du meinst den INDEX CREATION ERROR
.
Sorry, atc_less liest nur das XMLRefdataPharma-latest.xml aus. Generiert wird es im ext/refdata/src/refdata.src in der Prozedure historize.
Placing a few pry debug statement and restarting the ext/refdata/bin/refdatad and jobs/update_refdata.
This should be fixed with commit https://github.com/ngiger/oddb.org/commit/5beccc6fe883881d73a8ea4e72cc6b6d2e5591da "(#156) Use https to fetch refdata articles. Better logging".
On thinpower restarted jobs/import_bsv_followers
(in screen import_bsv)
bsv_followers
.sudo -u apache bundle-300 exec ruby-300 jobs/update_refdata
.XMLRefdataPharma-latest.xml
has not been downloaded since 6.1.2022