solid_queue_autoscaler 1.0.7 → 1.0.9
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 +45 -0
- data/README.md +770 -4
- data/lib/generators/solid_queue_autoscaler/migration_generator.rb +180 -4
- data/lib/generators/solid_queue_autoscaler/templates/README +27 -6
- data/lib/generators/solid_queue_autoscaler/templates/create_solid_queue_autoscaler_events.rb.erb +17 -10
- data/lib/generators/solid_queue_autoscaler/templates/create_solid_queue_autoscaler_state.rb.erb +9 -0
- data/lib/generators/solid_queue_autoscaler/templates/initializer.rb +6 -0
- data/lib/solid_queue_autoscaler/autoscale_job.rb +10 -0
- data/lib/solid_queue_autoscaler/configuration.rb +13 -0
- data/lib/solid_queue_autoscaler/scale_event.rb +183 -0
- data/lib/solid_queue_autoscaler/scaler.rb +98 -20
- data/lib/solid_queue_autoscaler/version.rb +1 -1
- data/lib/solid_queue_autoscaler.rb +254 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81d3e6d0be9fecbd42eb8e0539acec901babd77d99688e685a051a4c84e8c90f
|
|
4
|
+
data.tar.gz: 987c1f62cec4ce7435a1c5c07d37a01e15705919b81d5e7f8d28cb04688f91f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d07364fdabd8df5280f9f9216513fa1f7d0dc480f46a4ee7a7b854c586bf64131fd9f28495cf7cae698df90812c7713eb30c686265cebfeac5008017dab00e7e
|
|
7
|
+
data.tar.gz: cf31a9d4f505b68e80d12efbc36cbfb97452ac9207c66c6075093b77aeb74660b2fd20b722fa41dfd5e1d07be2dd1cf15594815ce1c775db02f6c7314e0e4f11
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.9] - 2025-01-17
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **`verify_setup!` method** - New diagnostic method to verify installation is correct
|
|
14
|
+
- Checks database connection (multi-database aware)
|
|
15
|
+
- Verifies both autoscaler tables exist with correct columns
|
|
16
|
+
- Tests adapter connectivity
|
|
17
|
+
- Returns a `VerificationResult` struct with `ok?`, `tables_exist?`, `cooldowns_shared?` methods
|
|
18
|
+
- Run `SolidQueueAutoscaler.verify_setup!` in Rails console to diagnose issues
|
|
19
|
+
- **`verify_install!` alias** - Alias for `verify_setup!`
|
|
20
|
+
- **`persist_cooldowns` configuration option** - Control whether cooldowns are stored in database (default: true) or in-memory
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- **Fixed multi-database migration bug** - Migration generator now correctly handles `migrations_paths` as a string (not just array)
|
|
24
|
+
- Previously, migrations would be placed in a `d/` directory instead of `db/queue_migrate/` due to calling `.first` on a string
|
|
25
|
+
- Migrations now auto-detect the correct directory from your `database.yml` configuration
|
|
26
|
+
- **Removed unreliable `self.connection` override** from migration templates - This didn't work because `SolidQueue::Record` isn't loaded at migration time
|
|
27
|
+
- **Improved migration generator output** - Clearer instructions for single-database vs multi-database setups
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- `verify_setup!` returns `nil` instead of the result object to keep console output clean
|
|
31
|
+
- Migration templates no longer try to override the database connection (rely on Rails native multi-database support instead)
|
|
32
|
+
|
|
33
|
+
## [1.0.8] - 2025-01-17
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- **`job_queue` configuration option** - Configure which queue the AutoscaleJob runs on (default: `:autoscaler`)
|
|
37
|
+
- **`job_priority` configuration option** - Set job priority for AutoscaleJob (lower = higher priority)
|
|
38
|
+
- **Multi-database migration support** - Migration templates now automatically create tables in the same database as Solid Queue
|
|
39
|
+
- **Common Configuration Examples** - New README section with 8 copy-paste ready configurations for different use cases:
|
|
40
|
+
- Simple/Starter setup
|
|
41
|
+
- Cost-Optimized (scale to zero)
|
|
42
|
+
- E-Commerce/SaaS (multiple worker types)
|
|
43
|
+
- High-Volume API (webhook processing with proportional scaling)
|
|
44
|
+
- Data Processing/ETL
|
|
45
|
+
- High-Availability
|
|
46
|
+
- Kubernetes
|
|
47
|
+
- Development/Testing
|
|
48
|
+
- **Expanded Troubleshooting** - 15+ new troubleshooting topics with code examples
|
|
49
|
+
- **Configuration Comparison Table** - Quick reference for common configurations
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- AutoscaleJob now uses `queue_as` and `queue_with_priority` blocks for dynamic queue/priority selection
|
|
53
|
+
- Each worker configuration can have its own `job_queue` and `job_priority` settings
|
|
54
|
+
|
|
10
55
|
## [1.0.7] - 2025-01-16
|
|
11
56
|
|
|
12
57
|
### Fixed
|