Skip to content

Commit a12d56f

Browse files
committed
complete refactor
1 parent 8cfb98f commit a12d56f

File tree

8 files changed

+4
-15
lines changed

8 files changed

+4
-15
lines changed

config/outboxer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
:batch_size: 1000
3-
:buffer_size: 10
43
:concurrency: 1
54
:tick_interval: 0.1
65
:poll_interval: 5.0

lib/outboxer/message.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Outboxer
2-
# Message lifecycle management including queuing, buffering, and publishing of messages.
2+
# Message lifecycle management including queuing and publishing of messages.
33
module Message
44
module_function
55

@@ -61,7 +61,7 @@ def publish(logger: nil, time: ::Time)
6161
nil
6262
else
6363
logger&.info(
64-
"Outboxer message publishing id=#{message[:id]}" \
64+
"Outboxer message publishing id=#{message[:id]} " \
6565
"messageable_type=#{message[:messageable_type]} " \
6666
"messageable_id=#{message[:messageable_id]}")
6767

lib/outboxer/publisher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def terminating?
1212
# Parses command line arguments to configure the publisher.
1313
# @param args [Array<String>] The arguments passed via the command line.
1414
# @return [Hash] The parsed options including configuration path, environment,
15-
# buffer size, batch_size, and intervals.
15+
# batch_size, and intervals.
1616
def self.parse_cli_options(args)
1717
options = {}
1818

lib/outboxer/web/views/message.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,9 @@
8686
else
8787
0
8888
end
89-
total_latency = queue_latency + buffer_latency + publish_latency
89+
total_latency = queue_latency + publish_latency
9090

9191
queue_percent = total_latency > 0 ? (queue_latency / total_latency * 100).round(2) : 0
92-
buffer_percent = total_latency > 0 ? (buffer_latency / total_latency * 100).round(2) : 0
9392
publish_percent = total_latency > 0 ? (publish_latency / total_latency * 100).round(2) : 0
9493
%>
9594
<table class="table table-bordered">

lib/outboxer/web/views/publisher.erb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@
8282
<th scope="row">Batch Size</th>
8383
<td><%= publisher[:settings]['batch_size'] %></td>
8484
</tr>
85-
<tr>
86-
<th scope="row">Buffer Size</th>
87-
<td><%= publisher[:settings]['buffer_size'] %></td>
88-
</tr>
8985
<tr>
9086
<th scope="row">Concurrency</th>
9187
<td><%= publisher[:settings]['concurrency'] %></td>

spec/factories/outboxer_publishers.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
status { Outboxer::Publisher::Status::PUBLISHING }
55
settings do
66
{
7-
"buffer_size" => 1000,
87
"concurrency" => 3,
98
"tick_interval" => 0.1,
109
"poll_interval" => 5.0,

spec/lib/outboxer/publisher/all_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module Outboxer
99
name: "server-09:67000",
1010
status: Publisher::Status::PUBLISHING,
1111
settings: {
12-
"buffer_size" => 1000,
1312
"concurrency" => 2,
1413
"tick_interval" => 0.1,
1514
"poll_interval" => 5.0,
@@ -46,7 +45,6 @@ module Outboxer
4645
expect(publishers[0][:name]).to eq(publisher.name)
4746
expect(publishers[0][:status]).to eq("publishing")
4847
expect(publishers[0][:settings]).to eq({
49-
"buffer_size" => 1000,
5048
"concurrency" => 2,
5149
"tick_interval" => 0.1,
5250
"poll_interval" => 5.0,

spec/lib/outboxer/publisher/find_by_id_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module Outboxer
99
name: "server-09:67000",
1010
status: Publisher::Status::PUBLISHING,
1111
settings: {
12-
"buffer_size" => 1000,
1312
"concurrency" => 2,
1413
"tick_interval" => 0.1,
1514
"poll_interval" => 5.0,
@@ -45,7 +44,6 @@ module Outboxer
4544
expect(result[:name]).to eq(publisher.name)
4645
expect(result[:status]).to eq("publishing")
4746
expect(result[:settings]).to eq({
48-
"buffer_size" => 1000,
4947
"concurrency" => 2,
5048
"tick_interval" => 0.1,
5149
"poll_interval" => 5.0,

0 commit comments

Comments
 (0)