bbmb 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 539253d09b62765c28bc81f550e1831fd5d6fade
4
- data.tar.gz: 54e3f3a803f0b54ec32c1fd2bc111f2f07ed5e63
3
+ metadata.gz: b9960291f2555edc515e193b763d95d082fadb45
4
+ data.tar.gz: f4d91f9aa827270b523daae89046879d03d52c4f
5
5
  SHA512:
6
- metadata.gz: 5b56bf4ea3c9fc2f19eca1eeea3db51ca2faee383fe63f79fc0940c0e7531c8b090d7b7368be64d14b177fd3363c9868d9e3a6e4383b5700117de2374d5b6f6a
7
- data.tar.gz: 2bc9a62ea60ec95ee4141921c4aeb75fae09fd12a275e453404471eac7b0a6d4a205ad2b2d49e42677cf3b4bbc892dd4c214614a8429bdf32ce2ee9911367147
6
+ metadata.gz: 48b42e38b311a50603742e0afd4b7149dbb66fcd98307baaa888619ca6312f40ac196ece8aaf57808070255df9b00098383677285c12dd2bb091cdba6d495709
7
+ data.tar.gz: 7c60ac0e1f92d79270b16341da870032a1c88096209d75bc38693023b53f0edffb81fc9a82d98fe680afabea61fddd8544ed83a215a18354de28931dac1d7253
@@ -1,3 +1,7 @@
1
+ === 2.2.4 / 22.05.2017
2
+
3
+ * Fix send_order
4
+
1
5
  === 2.2.3 / 22.05.2017
2
6
 
3
7
  * Delete in Schnellbestellung all positions with an invalid product
@@ -44,8 +44,9 @@ class CurrentOrder < Global
44
44
  unless error?
45
45
  _customer.commit_order!
46
46
  order = @model
47
+ SBSM.info("committing #{_customer.customer_id} #{order.order_id} #{caller[0..10].join("\n")}")
47
48
  @session.async {
48
- @session.send_order order, _customer
49
+ @session.app.send_order order, _customer
49
50
  }
50
51
  @model = _customer.current_order
51
52
  Info.new(@session, :message => :order_sent,
@@ -62,6 +62,33 @@ module BBMB
62
62
  start_service
63
63
  }
64
64
  end
65
+ def send_order order, customer
66
+ SBSM.logger.info "send_order #{order.order_id} and customer #{customer.customer_id}"
67
+ begin
68
+ Timeout.timeout(300) {
69
+ BBMB::Util::TargetDir.send_order(order)
70
+ }
71
+ rescue StandardError => err
72
+ err.message << " (Email: #{customer.email} - Customer-Id: #{customer.customer_id})"
73
+ BBMB::Util::Mail.notify_error(err)
74
+ end
75
+ begin
76
+ Timeout.timeout(300) {
77
+ BBMB::Util::Mail.send_order(order)
78
+ }
79
+ rescue StandardError => err
80
+ err.message << " (Email: #{customer.email} - Customer-Id: #{customer.customer_id})"
81
+ BBMB::Util::Mail.notify_error(err)
82
+ end
83
+ begin
84
+ Timeout.timeout(300) {
85
+ BBMB::Util::Mail.send_confirmation(order)
86
+ }
87
+ rescue StandardError => err
88
+ err.message << " (Email: #{customer.email} - Customer-Id: #{customer.customer_id})"
89
+ BBMB::Util::Mail.notify_error(err)
90
+ end
91
+ end
65
92
  end
66
93
  end
67
94
  end
@@ -1,3 +1,3 @@
1
1
  module BBMB
2
- VERSION = '2.2.3'
2
+ VERSION = '2.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbmb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger