Sha256: fb3e881e3c0713acbb5e9f85165f9b601bd0c35a0fcba69895cbc23908956cdf
Contents?: true
Size: 541 Bytes
Versions: 15
Compression:
Stored size: 541 Bytes
Contents
# frozen_string_literal: true class Freddy class RequestManager def initialize(logger) @requests = {} @logger = logger end def no_route(correlation_id) request = @requests[correlation_id] return unless request delete(correlation_id) request[:callback].call({ error: 'Specified queue does not exist' }, nil) end def store(correlation_id, opts) @requests[correlation_id] = opts end def delete(correlation_id) @requests.delete(correlation_id) end end end
Version data entries
15 entries across 15 versions & 1 rubygems