Skip to content

Commit

Permalink
feat: add procline to the consumer process
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgz committed Nov 25, 2024
1 parent cf6c933 commit 48c04e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/lepus/processes/consumer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ def shutdown
super
end

def set_procline
procline consumer_class.name
end

def setup_consumer!
if consumer_class.config.nil?
raise Lepus::InvalidConsumerConfigError, "Consumer #{consumer_class.name} has no configuration"
end

@bunny = Thread.current[:lepus_bunny] || Lepus.config.create_connection
@channel = Thread.current[:lepus_channel] || begin
@bunny.create_channel(nil, 1, true).tap do |channel|
Expand Down

0 comments on commit 48c04e8

Please sign in to comment.