renalware-core 2.0.45 → 2.0.46

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
  SHA256:
3
- metadata.gz: 1a1c9ca94f32bd1524f80152063a831f780ac70f397b086d5c76b923834a13c4
4
- data.tar.gz: 103a797720d5e2dd3bd4f130c7bfe784a34cb28e1576898c5ca3a4653e1a8d5b
3
+ metadata.gz: 732d240382d52f901ed4a804957ec8e0292e26488815f741621e14a970d15e23
4
+ data.tar.gz: 6cf0e31ee2963a78d8aa91b9998f5081fb390fcb15bb80a1300d16507b283743
5
5
  SHA512:
6
- metadata.gz: 6500f6621008bb20a91c3853a54637e8a4c66eaace10a8d11528c2d35876c4723b408952933f0bf9dfd62bd12f1f48d14d9a2c78e8995de28a3c9e2c98e79abe
7
- data.tar.gz: 2cc83be3409bdc4e0b72e00d69d8bbad46ad678198bc754633a15b95abe1e202431618df4e6eb8ccdf1599ff8015ca7f3f606a9f32d016947a03e4dd5712666e
6
+ metadata.gz: d066affb2c30cc96a351589326374ae2405b9fc961bd5b01417a042033dbfaf35837dccfb988a4da6a07e16f8f939f85ce90244f85aac246801ceed8c3f6eb46
7
+ data.tar.gz: 639120743e01a18283491366adb983c4647ffa97efd8408b11d0a259883a2b98e2e4cb27d347cd40dc28eff7228b1cfd6a15d69a15138f15957813c6846679fb
@@ -14,7 +14,7 @@ module Renalware
14
14
  include Wisper::Publisher
15
15
 
16
16
  def call(raw_message)
17
- broadcast_args = nil
17
+ feed_message = nil
18
18
 
19
19
  # We want to wrap message processing in a transaction because if message processing
20
20
  # fails we don't want to leave an unprocessed message in the feed_messages table.
@@ -28,8 +28,11 @@ module Renalware
28
28
  ActiveRecord::Base.transaction do
29
29
  hl7_message = build_hl7_object_from(raw_message)
30
30
  feed_message = persist_message(hl7_message)
31
- broadcast_args = { hl7_message: hl7_message, feed_message: feed_message }
32
- broadcast(:message_arrived, broadcast_args)
31
+ broadcast(
32
+ :message_arrived,
33
+ hl7_message: hl7_message,
34
+ feed_message: feed_message
35
+ )
33
36
  end
34
37
 
35
38
  # Another event, this one letting anyone interested know that a message been successfully
@@ -39,7 +42,10 @@ module Renalware
39
42
  # main processing of the HL7 message from being rolled back.
40
43
  # They could use this for message processing but we'd rather it was used for post-processing
41
44
  # e.g. forwarding, logging etc.
42
- broadcast(:message_processed, broadcast_args)
45
+ # Its is recommended here to use an async listener - see example in renalware-diaverum
46
+ # - so that any error in the listener has its own try mechansim and does not cause the
47
+ # current job to retry,
48
+ broadcast(:message_processed, feed_message: feed_message)
43
49
  rescue StandardError => exception
44
50
  notify_exception(exception)
45
51
  raise exception
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.45"
4
+ VERSION = "2.0.46"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.45
4
+ version: 2.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-21 00:00:00.000000000 Z
11
+ date: 2018-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_type