Skip to content

Commit

Permalink
Fixed the implementation of the Act in queue_based_implementation_run…
Browse files Browse the repository at this point in the history
…ner.rb and also change the place (NOT PUBLISHED) is added to the error message in fatal_error_response.rb
  • Loading branch information
neomatrix369 committed Oct 29, 2018
1 parent b2226dc commit dd2fc73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/tdl/queue/abstractions/response/fatal_error_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 9 additions & 2 deletions lib/tdl/queue/queue_based_implementation_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd2fc73

Please sign in to comment.