Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed Aug 7, 2023
1 parent 5071009 commit 2d3eaae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/lavinmq/http/controller/nodes.cr
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module LavinMQ
run_queue: 0,
sockets_used: @amqp_server.vhosts.sum { |_, v| v.connections.size },
followers: @amqp_server.followers,
min_followers: @amqp_server.min_followers
}
end

Expand Down Expand Up @@ -106,6 +107,12 @@ module LavinMQ
end
context
end

put "/api/nodes/min_followers" do |context, params|
puts "min followers endpoint trigger"

end

end

APPLICATIONS = [{
Expand Down
2 changes: 1 addition & 1 deletion src/lavinmq/replication/server.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module LavinMQ
@followers = Array(Follower).new
@password : String
@files = Hash(String, MFile?).new
@min_followers = 5_i64
@min_followers = 0_i64

def initialize
@password = password
Expand Down
2 changes: 0 additions & 2 deletions src/lavinmq/vhost.cr
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ module LavinMQ
headers = properties.headers
find_all_queues(ex, msg.routing_key, headers, visited, found_queues)
headers.try(&.delete("BCC"))
puts @replicator.min_followers
puts @replicator.followers.size
return false if @replicator.followers.size < @replicator.min_followers
# @log.debug { "publish queues#found=#{found_queues.size}" }
if found_queues.empty?
Expand Down

0 comments on commit 2d3eaae

Please sign in to comment.