view · edit · sidebar · attach · print · history

20130619-debug-ydim-injection-for-enhops

<< | Index | >>


Summary

  • Create company-name option for fiparsed (PI, swissmedicXML) --> :suspend:
  • Debug Ydim in local machine and fastpower.

Index / Status


Create company name option for PI fiparsed

$ ruby jobs/update_textinfo_swissmedicinfo --target=pi --reparse EbiPharm Novartis Pfizer
suspend

Debug Ydim injection

Now, xmlconvd on production can get and parse E-mail without Error from pop.gmail.com over SSL-Connection (via stunnel daemon).
But ydim Setup is needed to check.

Setup ydim in my local VM.

bbmb and xmlconv uses ydim.

yasuhiro@silberhorn:~/.workspace/plygd$ grep -r ydim xmlconv/lib/
xmlconv/lib/xmlconv/util/invoicer.rb:require 'ydim/config'
xmlconv/lib/xmlconv/util/invoicer.rb:require 'ydim/client'
xmlconv/lib/xmlconv/util/invoicer.rb:      ydim_connect { |client|
xmlconv/lib/xmlconv/util/invoicer.rb:        ydim_inv = client.create_invoice(XmlConv::CONFIG.ydim_id)
xmlconv/lib/xmlconv/util/invoicer.rb:        ydim_inv.description = sprintf(XmlConv::CONFIG.invoice_format,
xmlconv/lib/xmlconv/util/invoicer.rb:        ydim_inv.date = date
xmlconv/lib/xmlconv/util/invoicer.rb:        ydim_inv.currency = currency
xmlconv/lib/xmlconv/util/invoicer.rb:        ydim_inv.payment_period = 30
xmlconv/lib/xmlconv/util/invoicer.rb:        client.add_items(ydim_inv.unique_id, item_data)
xmlconv/lib/xmlconv/util/invoicer.rb:        ydim_inv
xmlconv/lib/xmlconv/util/invoicer.rb:      ydim_connect { |client| client.send_invoice(invoice_id) }
xmlconv/lib/xmlconv/util/invoicer.rb:    def ydim_connect(&block)
xmlconv/lib/xmlconv/util/invoicer.rb:      if(path = XmlConv::CONFIG.ydim_config)
xmlconv/lib/xmlconv/config.rb:    'ydim_id'             => nil,
xmlconv/lib/xmlconv/config.rb:    'ydim_config'         => nil,
yasuhiro@silberhorn:~/.workspace/plygd$ grep -r ydim bbmb/lib/
bbmb/lib/bbmb/util/invoicer.rb:require 'ydim/config'
bbmb/lib/bbmb/util/invoicer.rb:require 'ydim/client'
bbmb/lib/bbmb/util/invoicer.rb:      ydim_connect { |client|
bbmb/lib/bbmb/util/invoicer.rb:        ydim_inv = client.create_invoice(BBMB.config.ydim_id)
bbmb/lib/bbmb/util/invoicer.rb:        ydim_inv.description = sprintf(@iconv.iconv(BBMB.config.invoice_format),
bbmb/lib/bbmb/util/invoicer.rb:        ydim_inv.date = date
bbmb/lib/bbmb/util/invoicer.rb:        ydim_inv.currency = currency
bbmb/lib/bbmb/util/invoicer.rb:        ydim_inv.payment_period = 30
bbmb/lib/bbmb/util/invoicer.rb:        client.add_items(ydim_inv.unique_id, items)
bbmb/lib/bbmb/util/invoicer.rb:        ydim_inv
bbmb/lib/bbmb/util/invoicer.rb:      ydim_connect { |client| client.send_invoice(invoice_id) }
bbmb/lib/bbmb/util/invoicer.rb:    def ydim_connect(&block)
bbmb/lib/bbmb/util/invoicer.rb:      if(path = BBMB.config.ydim_config)
bbmb/lib/bbmb/config.rb:    'ydim_config'                     => nil,
bbmb/lib/bbmb/config.rb:    'ydim_id'                         => nil,
  • vetoquinol.bbmb.ch (default database)
  • sandoz.bbmb.ch
  • sandoz.xmlconv.bbmb.ch
  • globopharm.xmlconv.bbmb.ch

vetoquinol.bbmb.ch

Dependencies of :bbmb:

diff
(.. xmlconv)
  • character-encodings 0.3.0
  • ruby-json 1.1.2

ydim

diff
(.. bbmb, xmlconv)
  • fastthread
  • rrba
  • pdfinvoice
  • pdf-writer
  • pdfinvoice (:site_ruby:)
yasuhiro@silberhorn:~/.work/var/ydim$ ruby -rrubygems bin/ydimd 
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "object_pkey" for table "object"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "object_name_key" for table "object"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "object_connection_pkey" for table "object_connection"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "collection_pkey" for table "collection"
I, [2013-06-19T13:41:47.995958 #32234]  INFO -- AutoInvoicer: next run Thu Jun 20 01:00:00 2013, sleeping 40692 seconds
I, [2013-06-19T13:41:49.258841 #32234]  INFO -- CurrencyUpdater: next run Thu Jun 20 02:00:00 2013, sleeping 44290 seconds
I, [2013-06-19T13:41:49.258962 #32234]  INFO -- StatusUpdater: next run Thu Jun 20 01:00:00 2013, sleeping 40690 seconds
I, [2013-06-19T13:41:49.259316 #32234]  INFO -- start: starting ydim-server on druby://localhost:12375

ydim expects config files ydim.yml(client), ydimd.yml and ydim-html.yml in:
(If not specified)

  • $HOME/.ydim
  • /etc/ydim

Then I made these yml files and then,

$ ruby -rrubygems ./bin/ydimd config=./etc/ydimd.yml

I have setuped also web-interface,

$ ruby -rrubygems ./bin/ydim-htmlgrid config=./etc/ydim-htmlgrid.yml

works fine.


ydim inject user

Ydim-Client must connect Server with DSA key.

I didn't know which user should we use for DSA keys.

  • Thinpower hat Ydim-Server and Ydim-Client.
  • Fastpower hat only Ydim-Client (It connects to Fastpower).

I found ydim-inject user for Ydim-Client on Fastpower.

 $ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
...
ydim-inject:x:1002:65533::/var/lib/ydim-inject/:/bin/bash
...
 $ cd /var/lib/ydim-inject/
ywesee@thinpower /var/lib/ydim-inject $ ls -al
.bash_history
.ssh           #=> public keys
.viminfo

I could understand, How to use ydim client ;)

ydim (client) connect to server with specified (in ydim.yml) DSA key as ydim-inject user.


Debug imagemagic error

Input file for conversion: /var/ebps/data/yaml/fachinfos_now.ch.oddb.yaml

Magick::ImageMagickError: no decode delegate for this image format `'
@ error/blob.c/BlobToImage/364
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/picture.rb:31:in
`from_blob'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/picture.rb:31:in
`image'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/picture.rb:37:in
`to_s'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/chapter.rb:32:in
`join'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/chapter.rb:32:in
`to_s'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/document.rb:32:in
`join'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/text/document.rb:32:in
`to_s'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/conversion/oebps.rb:64:in
`initialize'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/conversion/oebps.rb:459:in
`new'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/conversion/oebps.rb:459:in
`document_to_html'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/conversion/oebps.rb:414:in
`add_appendix'
/usr/local/bin/ruby191/lib/ruby/gems/1.9.1/gems/ebps-1.0.4/lib/ebps/conversion/oebps.rb:493:in
`block in export'

This means imagemagick needs USE="png jpeg".

link

view · edit · sidebar · attach · print · history
Page last modified on July 01, 2013, at 09:02 AM