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 +4 -4
- data/History.txt +4 -0
- data/lib/bbmb/html/state/current_order.rb +2 -1
- data/lib/bbmb/util/app.rb +27 -0
- data/lib/bbmb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9960291f2555edc515e193b763d95d082fadb45
|
4
|
+
data.tar.gz: f4d91f9aa827270b523daae89046879d03d52c4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b42e38b311a50603742e0afd4b7149dbb66fcd98307baaa888619ca6312f40ac196ece8aaf57808070255df9b00098383677285c12dd2bb091cdba6d495709
|
7
|
+
data.tar.gz: 7c60ac0e1f92d79270b16341da870032a1c88096209d75bc38693023b53f0edffb81fc9a82d98fe680afabea61fddd8544ed83a215a18354de28931dac1d7253
|
data/History.txt
CHANGED
@@ -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,
|
data/lib/bbmb/util/app.rb
CHANGED
@@ -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
|
data/lib/bbmb/version.rb
CHANGED