Skip to content

Commit

Permalink
naming align
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld committed Sep 1, 2024
1 parent c852bbd commit d5cb5ef
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def index
.map(&:to_a)
.flatten
.select(&:scheduled_messages?)
.select { |topic| topic.name.end_with?('messages') }
.reject { |topic| topic.name.end_with?(states_postfix) }
.map(&:name)
.sort

Expand All @@ -46,7 +46,7 @@ def index
# @param schedule_name [String] name of the schedules messages topic
def show(schedule_name)
@schedule_name = schedule_name
@stats_topic_name = "#{schedule_name[0..-9]}states"
@stats_topic_name = "#{schedule_name}#{states_postfix}"

@states = {}

Expand All @@ -63,6 +63,13 @@ def show(schedule_name)

render
end

private

# @return [String] states topic postfix
def states_postfix
@states_postfix ||= Karafka::App.config.scheduled_messages.states_postfix
end
end
end
end
Expand Down

0 comments on commit d5cb5ef

Please sign in to comment.