solid_queue_heroku_autoscaler 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/lib/solid_queue_heroku_autoscaler/configuration.rb +30 -2
- data/lib/solid_queue_heroku_autoscaler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6927f03d865cab392afcd4c87b0b28c7d2d8539acdbd7ac320ba1e9ba404e59c
|
|
4
|
+
data.tar.gz: 8b035b6b886ad23c2f271298b4586003bae3a11964d476b65cde6bf7f035f284
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a664d1defe3c0c0f0a2a9db8c3d9f17623ca0fe7909c62f2fd4004bd2ffec00f625d6cc74d49eed5b7d10a7bea2cc86d1996424a0676fcf5411b6ee7f9274818
|
|
7
|
+
data.tar.gz: e395566cf91202a05cf5914860c8ac417cbdf44dfe7fbda961e407adbd8cf9602278a6237880a58e6042900a442eb7ca7be2266ded4c8193fa702a90cf955009
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.1] - 2025-01-16
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Adapter symbol support**: Fixed `config.adapter = :heroku` and `config.adapter = :kubernetes` not working correctly. The adapter setter now properly converts symbols to adapter instances.
|
|
15
|
+
- Also supports `config.adapter = :k8s` as an alias for `:kubernetes`
|
|
16
|
+
|
|
17
|
+
## [0.2.0] - 2025-01-20
|
|
18
|
+
|
|
10
19
|
### Added
|
|
11
20
|
|
|
12
21
|
- **Dashboard UI**: Web-based dashboard for monitoring autoscaler events and status
|
|
@@ -18,8 +27,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
27
|
- **Event recording configuration**: `record_events` and `record_all_events` options
|
|
19
28
|
- **New rake tasks**: `events`, `cleanup_events` for managing scale event history
|
|
20
29
|
- **Dashboard generator**: `rails generate solid_queue_heroku_autoscaler:dashboard`
|
|
30
|
+
- **Ruby 3.4 support**: Added CI testing for Ruby 3.4
|
|
21
31
|
|
|
22
|
-
## [0.1.0] - 2025-01-
|
|
32
|
+
## [0.1.0] - 2025-01-19
|
|
23
33
|
|
|
24
34
|
### Added
|
|
25
35
|
|
|
@@ -139,4 +149,6 @@ metrics = SolidQueueHerokuAutoscaler.metrics(:default)
|
|
|
139
149
|
SolidQueueHerokuAutoscaler.registered_workers
|
|
140
150
|
```
|
|
141
151
|
|
|
152
|
+
[0.2.1]: https://github.com/reillyse/solid_queue_heroku_autoscaler/releases/tag/v0.2.1
|
|
153
|
+
[0.2.0]: https://github.com/reillyse/solid_queue_heroku_autoscaler/releases/tag/v0.2.0
|
|
142
154
|
[0.1.0]: https://github.com/reillyse/solid_queue_heroku_autoscaler/releases/tag/v0.1.0
|
|
@@ -220,11 +220,39 @@ module SolidQueueHerokuAutoscaler
|
|
|
220
220
|
end
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
-
# Allow setting a pre-configured adapter instance
|
|
224
|
-
|
|
223
|
+
# Allow setting a pre-configured adapter instance or a symbol shortcut
|
|
224
|
+
# @param value [Symbol, Base, Class] :heroku, :kubernetes, an adapter instance, or adapter class
|
|
225
|
+
def adapter=(value)
|
|
226
|
+
@adapter = case value
|
|
227
|
+
when Symbol
|
|
228
|
+
resolve_adapter_symbol(value)
|
|
229
|
+
when Class
|
|
230
|
+
value.new(config: self)
|
|
231
|
+
else
|
|
232
|
+
value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Maps adapter symbols to adapter classes
|
|
237
|
+
ADAPTER_SYMBOLS = {
|
|
238
|
+
heroku: 'SolidQueueHerokuAutoscaler::Adapters::Heroku',
|
|
239
|
+
kubernetes: 'SolidQueueHerokuAutoscaler::Adapters::Kubernetes',
|
|
240
|
+
k8s: 'SolidQueueHerokuAutoscaler::Adapters::Kubernetes'
|
|
241
|
+
}.freeze
|
|
225
242
|
|
|
226
243
|
private
|
|
227
244
|
|
|
245
|
+
def resolve_adapter_symbol(symbol)
|
|
246
|
+
class_name = ADAPTER_SYMBOLS[symbol]
|
|
247
|
+
unless class_name
|
|
248
|
+
raise ConfigurationError,
|
|
249
|
+
"Unknown adapter: #{symbol}. Valid options: #{ADAPTER_SYMBOLS.keys.join(', ')}"
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
klass = class_name.split('::').reduce(Object) { |mod, name| mod.const_get(name) }
|
|
253
|
+
klass.new(config: self)
|
|
254
|
+
end
|
|
255
|
+
|
|
228
256
|
def default_logger
|
|
229
257
|
if defined?(Rails) && Rails.logger
|
|
230
258
|
Rails.logger
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solid_queue_heroku_autoscaler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- reillyse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|