Skip to content

Commit b050c21

Browse files
clauderobacarp
authored andcommitted
Updates changelog
1 parent 26b6237 commit b050c21

4 files changed

Lines changed: 15 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,22 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
1717
- Queue events: enqueue, dequeue, reschedule, forget, and banish
1818
- Expected job duration is now published with executor events
1919
The Mosquito API can be used to subscribe to these events with `Mosquito::API.event_receiver`
20-
- Pluggable dequeue adapters allow customizing how jobs are selected from queues
20+
- Pluggable dequeue adapters allow customizing how jobs are selected from queues (#183)
2121
- `DequeueAdapter` abstract base class defines the adapter interface
2222
- `ShuffleDequeueAdapter` is the default, preserving existing randomized behavior
2323
- `WeightedDequeueAdapter` allows queue-level prioritization via configurable weights
2424
- Configurable via `Mosquito.configure { |c| c.dequeue_adapter = ... }`
25-
- Executor count is now configurable (default increased from 3 to 6)
25+
- Executor count is now configurable (default increased from 3 to 6) (#184)
2626
- Set via `Mosquito.configure { |c| c.executor_count = 10 }`
2727
- Override with the `MOSQUITO_EXECUTOR_COUNT` environment variable
28-
- `JobRun#started_at` and `JobRun#finished_at` timestamps are now exposed as typed `Time?` getters
29-
- Graceful worker shutdown: on SIGTERM/SIGINT the overseer stops dequeuing, waits for in-flight executors to finish, and requeues any jobs left in pending back to waiting
30-
- Overseers now take ownership of job runs when dequeued, and clean up abandoned pending job runs on startup
28+
- `JobRun#started_at` and `JobRun#finished_at` timestamps are now exposed as typed `Time?` getters (#179)
29+
- Graceful worker shutdown: on SIGTERM/SIGINT the overseer stops dequeuing, waits for in-flight executors to finish, and requeues any jobs left in pending back to waiting (#190)
30+
- Queues can now be paused and resumed. While paused, `#dequeue` returns nil and jobs accumulate until the queue is resumed. An optional duration enables automatic resumption, useful for backing off rate-limited resources. (#192)
31+
- Overseers now take ownership of job runs when dequeued, and clean up abandoned pending job runs on startup (#180)
3132
- Mosquito can now accept pre-existing backend connections via `Configuration#backend_connection`. This allows sharing a connection pool with the rest of an application. (#193)
3233

3334
### Changed
34-
- (breaking) `Configuration#connection_string` has been renamed to `Configuration#backend_connection_string` (#193)
35+
+- (breaking) `Configuration#connection_string` has been renamed to `Configuration#backend_connection_string` (#193)
3536
- (minor breaking) Logs are now emitted from runners with a slighly different source tag. (#152)
3637
For example:
3738
The overseer boot message used to be:

spec/helpers/global_helpers.cr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ module TestHelpers
1818
def backend : Mosquito::Backend
1919
Mosquito.configuration.backend
2020
end
21+
22+
def testing_redis_url : String
23+
ENV["REDIS_URL"]? || "redis://localhost:6379/3"
24+
end
2125
end
2226

2327
extend TestHelpers

spec/mosquito/configuration_spec.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ require "../spec_helper"
33
describe "Mosquito Config" do
44
it "allows setting / retrieving the connection string" do
55
Mosquito.temp_config do
6-
Mosquito.configuration.backend_connection_string = "redis://localhost:6379/3"
7-
assert_equal "redis://localhost:6379/3", Mosquito.configuration.backend_connection_string
6+
Mosquito.configuration.backend_connection_string = testing_redis_url
7+
assert_equal testing_redis_url, Mosquito.configuration.backend_connection_string
88
end
99
end
1010

@@ -72,7 +72,7 @@ describe "Mosquito Config" do
7272

7373
it "validates when backend_connection_string is set" do
7474
Mosquito.temp_config do
75-
Mosquito.configuration.backend_connection_string = "redis://localhost:6379/3"
75+
Mosquito.configuration.backend_connection_string = testing_redis_url
7676
Mosquito.configuration.validate
7777
end
7878
end

spec/spec_helper.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Timecop.safe_mode = true
99

1010
require "../src/mosquito"
1111
Mosquito.configure do |settings|
12-
settings.backend_connection_string = ENV["REDIS_URL"]? || "redis://localhost:6379/3"
12+
settings.backend_connection_string = testing_redis_url
1313
settings.publish_metrics = true
1414
end
1515

0 commit comments

Comments
 (0)