view · edit · sidebar · attach · print · history

20160901-urgent-debug-virbac-bbmb-ch-vetoquinol-bbmb-ch

<< 20160902-fix-vetoquinol-smtp-ssl-error-fix-xmlconv-and-bbmb-flavored-issue | Index | 20160831-urgent-debug-sandoz-xmlconv-bbmb-ch >>


Summary

  • Fixed trouble for vetoquinot.bbmb.ch, virbac.bbmb.ch, sandoz.bbmb.ch, davaz.com, steinwies.ch
  • Problems were: Apache config, RubyAddPath, wrong Permision, SSL, SBSM Redirect Issue (flavor issue).
  • Theese problems were occured by error of updater. (We've noticed by that)

Commits / Patches / Pull Requests, Scripts

  • only urgent patches on production. (tomorrow, make some commits)

Index


Migrate bbmb.ch applications to 2.3.1

Redirect issues again in bbmb.ch.
We have to migrate these applications to 2.3.1 (sbsm-1.3.0).

Currently production has various changes in each boot script and trans_handler.yml for these bbmb applications.
I've just upgraded {virbac|vetoquinol|sandoz}.bbmb.ch applications with Ruby 2.3.1. And then arranged these files.

sandoz.bbmb.ch

/service/sandoz.bbmb.ch/run

#!/bin/sh
exec 2>&1
exec sudo -u bbmb /usr/local/bin/ruby231 \
  -I/var/www/sandoz.bbmb.ch/lib \
  -rydim/invoice \
  /usr/local/bin/bbmbd config=/var/www/sandoz.bbmb.ch/etc/config.yml
trans_handler.yml
---
  shortcut:
    '/':
      'language': 'de'

virbac.bbmb.ch

/service/virbac.bbmb.ch/run

#!/bin/sh
exec 2>&1
exec sudo -u bbmb /usr/local/bin/ruby231 \
  -I/var/www/virbac.bbmb.ch/lib \
  -rydim/invoice \
  /usr/local/bin/bbmbd config=/var/www/virbac.bbmb.ch/etc/config.yml

trans_handler.yml

---
  shortcut:
    '/':
      'language': 'de'

vetoquinol.bbmb.ch

/service/vetoquinol.bbmb.ch/run

#!/bin/sh
exec 2>&1
exec sudo -u bbmb /usr/local/bin/ruby231 \
  -I/var/www/vetoquinol.bbmb.ch/lib \
  -rydim/invoice \
  /usr/local/bin/bbmbd config=/var/www/vetoquinol.bbmb.ch/etc/config.yml

trans_handler.yml

---
  shortcut:
    '/':
      'language': 'de'

Debug updater sandoz.bbmb.ch

Why updater of sandoz.bbmb.ch does not update price for product which has pharmacode 2508406.

# order: last line does not have valid price
99,,01092016,92,6443023,7680578850073,44050158,2,15.32,99,
99,,01092016,92,5153984,7680594160064,44038123,2,185.22,99,
99,,01092016,92,2508406,7680555250186,44045701,2,0.00,99,
[36] 2.3.1-p112(#<BBMB::Util::ProductImporter>)> ODBA.cache.retrieve_from_index('bbmb_model_customer_customer_id', '').find {|c| \
 c.customer_id == '99' }.orders.last.positions.map {|p| p.product }.last.pcode
=> "2508406"

Updater looks good. I think problem is Order inject.

# injection process
[6] 2.3.1-p112(#<BBMB::Util::Server>)> Model::Product.find_by_pcode(info[:pcode]).pcode
=> "2508406"
[7] 2.3.1-p112(#<BBMB::Util::Server>)> Model::Product.find_by_pcode(info[:pcode]).price
=> nil

# But this product has price.
[9] 2.3.1-p112(#<BBMB::Util::Server>)> ODBA.cache.retrieve_from_index('bbmb_model_product_pcode', '').find {|p| \
p.pcode == '2508406' }.price
=> #<BBMB::Util::Money:0x007f36c5442fc0 @credits=2462>

There are 2 products in index. Thi is problem.

# this is imported / updated by updater script
[10] 2.3.1-p112(#<BBMB::Util::Server>)> ODBA.cache.retrieve_from_index('bbmb_model_product_pcode', '').find {|p| \
p.pcode == '2508406' }.odba_id
=> 510040

# find_by_pcode returns other object
[12] 2.3.1-p112(#<BBMB::Util::Server>)> BBMB::Model::Product.find_by_pcode(info[:pcode]).odba_id
=> 509969

Then, I've just delete these Product (with Persistence#odba_delete method). and then started updater script.
It has worked expectedly.

# This is bin/admin (command)
$ /usr/local/bin/ruby231 /usr/local/bin/bbmb_admin config=/var/www/sandoz.bbmb.ch/etc/config.yml 
ch.bbmb.sandoz> 
# How to delete ODBA Object
ch.bbmb.sandoz> BBMB::Model::Product.find_by_pcode('2508406').odba_delete
# check in injection process
[2] 2.3.1-p112(#<BBMB::Util::Server>)> product.price
=> #<BBMB::Util::Money:0x007f36c5442fc0 @credits=2462>

TODO

  • [x] xmlconv (remove non flavored url generator method) fixed 02.09.2016
  • [x] bbmb (fix pop mission) fixed 02.09.2016
  • davaz.com (remove non flavored trans handler)
  • sbsm (add support non flavored trans handler)

And then use non flavored trans handler at following sites: (feature)

  • sandoz.xmlconv.bbmb.ch
  • sandoz.bbmb.ch
  • vetoquinol.bbmb.ch
  • virbac.bbmb.ch
  • danaz.com
view · edit · sidebar · attach · print · history
Page last modified on September 09, 2016, at 01:56 PM