From dd2fc733e3833158280363686836d524e49c6978 Mon Sep 17 00:00:00 2001 From: neomatrix369 Date: Mon, 29 Oct 2018 19:47:53 +0000 Subject: [PATCH] Fixed the implementation of the Act in queue_based_implementation_runner.rb and also change the place (NOT PUBLISHED) is added to the error message in fatal_error_response.rb --- .../abstractions/response/fatal_error_response.rb | 4 ++-- lib/tdl/queue/queue_based_implementation_runner.rb | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/tdl/queue/abstractions/response/fatal_error_response.rb b/lib/tdl/queue/abstractions/response/fatal_error_response.rb index 0dceddb..3fdca71 100644 --- a/lib/tdl/queue/abstractions/response/fatal_error_response.rb +++ b/lib/tdl/queue/abstractions/response/fatal_error_response.rb @@ -2,11 +2,11 @@ module TDL class FatalErrorResponse def initialize(message) - @message = message + @message = message + ", (NOT PUBLISHED)" end def audit_text - "error = #{@message}, (NOT PUBLISHED)" + "error = #{@message}" end end end diff --git a/lib/tdl/queue/queue_based_implementation_runner.rb b/lib/tdl/queue/queue_based_implementation_runner.rb index 03a31a4..6e88927 100644 --- a/lib/tdl/queue/queue_based_implementation_runner.rb +++ b/lib/tdl/queue/queue_based_implementation_runner.rb @@ -63,11 +63,18 @@ def process_next_request_from(remote_broker, request) # Act if response.instance_of? FatalErrorResponse - remote_broker.close - @audit.end_line + # Do nothing else remote_broker.respond_to(request, response) end + + @audit.end_line + + if response.instance_of? FatalErrorResponse + remote_broker.close + else + # Do nothing + end end end end