Sha256: fb810eff04e33e09b7273dd15ce7f7db811887a8b71867f35c55486e0bf712f0
Contents?: true
Size: 565 Bytes
Versions: 5
Compression:
Stored size: 565 Bytes
Contents
# frozen_string_literal: true module Jackhammer class Server def self.configure Jackhammer.configure do |config| yield config config.server = self end end def self.start running = true Signal.trap('INT') do print "\n\nstopping...\n" running = false end Jackhammer.topics.each { |_name, topic| topic.subscribe_queues } Log.info 'Topic queues subscribed and listening... Send INT signal to stop.' sleep 2 while running Jackhammer.connection.close end end end
Version data entries
5 entries across 5 versions & 1 rubygems