judoscale-ruby 1.8.3 → 1.10.0
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/lib/judoscale/config.rb +20 -14
- data/lib/judoscale/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: a4bc0aac7fb199da1e1e4602136b9c3c9bf5a9210861893172e1a33988a1c60a
|
4
|
+
data.tar.gz: 1fd02e843f7d67331a8d843e70931c4b32c84310d299b8a5f12b6a3effdff4af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c88289dafeb2033b5bbbcdb90f5ff2e68520d7ce0a446af958632c3551e433f6eeea0c7ec531687d1acd03275ebdb954463e3a6edcc71ba6638ea13672ae3d1b
|
7
|
+
data.tar.gz: 828b3bebf4c5823a83448698d83b939b620f57d6111ace29bd046a81e9735ab30dbfcfbf0d79169fdc95381ec79298b55f7d20c91809cd1041f7350780aa4c3a
|
data/lib/judoscale/config.rb
CHANGED
@@ -93,20 +93,26 @@ module Judoscale
|
|
93
93
|
|
94
94
|
self.class.adapter_configs.each(&:reset)
|
95
95
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
96
|
+
@current_runtime_container =
|
97
|
+
if ENV.include?("DYNO")
|
98
|
+
RuntimeContainer.new ENV["DYNO"]
|
99
|
+
elsif ENV.include?("RENDER_INSTANCE_ID")
|
100
|
+
# Deprecated API url using the service ID for legacy render services not using `JUDOSCALE_URL`.
|
101
|
+
@api_base_url ||= "https://adapter.judoscale.com/api/#{ENV["RENDER_SERVICE_ID"]}"
|
102
|
+
|
103
|
+
instance = ENV["RENDER_INSTANCE_ID"].delete_prefix("#{ENV["RENDER_SERVICE_ID"]}-")
|
104
|
+
RuntimeContainer.new instance
|
105
|
+
elsif ENV.include?("ECS_CONTAINER_METADATA_URI")
|
106
|
+
instance = ENV["ECS_CONTAINER_METADATA_URI"].split("/").last
|
107
|
+
RuntimeContainer.new instance
|
108
|
+
elsif ENV.include?("FLY_MACHINE_ID")
|
109
|
+
RuntimeContainer.new ENV["FLY_MACHINE_ID"]
|
110
|
+
elsif ENV.include?("RAILWAY_REPLICA_ID")
|
111
|
+
RuntimeContainer.new ENV["RAILWAY_REPLICA_ID"]
|
112
|
+
else
|
113
|
+
# Unsupported platform...
|
114
|
+
RuntimeContainer.new("")
|
115
|
+
end
|
110
116
|
end
|
111
117
|
|
112
118
|
def log_level=(new_level)
|
data/lib/judoscale/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: judoscale-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam McCrea
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2025-02-17 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description:
|
16
16
|
email:
|