deployangel 0.1.2 → 0.1.4
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 +15 -0
- data/lib/deployangel/agent.rb +7 -2
- data/lib/deployangel/rails/metadata.rb +13 -1
- data/lib/deployangel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 633da2fd342948cb1c2b6f845f05b9a5262d9674a2f7d40f05532995f0751d7e
|
|
4
|
+
data.tar.gz: 63327a9c5226d6032f2d7fdc6e432fee07a2cec9bf9d979cd96905b8d362e22c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70be2af92e45071c06cf09d60ec43a301db1803eabe917f294927b73d82917283fb9f6cb81af1b6e2daf522b65c52dc9985f1c75c3a16f006157b797c6e2bd15
|
|
7
|
+
data.tar.gz: 40518de68db5c3588bccb02e90068dbcc378b342a3ca0325d6a59c253cfa5daead535a54203247d9f58b5910f6d29b3ab2bdec8b23144515141754478bc5417a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4 (2026-10-03)
|
|
4
|
+
|
|
5
|
+
- A Solid Queue recurring task that runs a `command:` instead of a job class
|
|
6
|
+
reports the job class it runs as (`runs_as`, `SolidQueue::RecurringJob`
|
|
7
|
+
unless the app changes Solid Queue's default). DeployAngel can then expect
|
|
8
|
+
it on schedule and show it by its name in `config/recurring.yml`, instead
|
|
9
|
+
of guessing an interval from history and showing Solid Queue's wrapper.
|
|
10
|
+
|
|
11
|
+
## 0.1.3 (2026-10-02)
|
|
12
|
+
|
|
13
|
+
- Each process sends its minute of telemetry 1 to 50 seconds after the
|
|
14
|
+
minute ends, chosen once per process, instead of within the first 10
|
|
15
|
+
seconds. Apps' batches reach DeployAngel spread across the minute rather
|
|
16
|
+
than all at once.
|
|
17
|
+
|
|
3
18
|
## 0.1.2 (2026-10-02)
|
|
4
19
|
|
|
5
20
|
- Unsent minutes wait in the buffer as gzipped JSON rather than Ruby objects.
|
data/lib/deployangel/agent.rb
CHANGED
|
@@ -9,6 +9,12 @@ module DeployAngel
|
|
|
9
9
|
METADATA_PATH = "/api/v1/application_metadata"
|
|
10
10
|
SHUTDOWN_TIMEOUT = 2
|
|
11
11
|
DEFAULT_PAUSE = 60
|
|
12
|
+
# Seconds past each minute a process waits before sending, chosen once
|
|
13
|
+
# per process so the cloud gets a steady stream instead of a burst at
|
|
14
|
+
# the top of the minute. The cloud reads a minute 2 minutes after it
|
|
15
|
+
# ends, so a send that times out (5 seconds) and goes again a minute
|
|
16
|
+
# later still lands in time.
|
|
17
|
+
FLUSH_JITTER = 1.0..50.0
|
|
12
18
|
|
|
13
19
|
attr_reader :config, :release, :instance
|
|
14
20
|
attr_writer :metadata
|
|
@@ -173,8 +179,7 @@ module DeployAngel
|
|
|
173
179
|
@paused_until = nil
|
|
174
180
|
@metadata_sent = false
|
|
175
181
|
@thread = nil
|
|
176
|
-
|
|
177
|
-
@jitter = rand(1.0..10.0)
|
|
182
|
+
@jitter = rand(FLUSH_JITTER)
|
|
178
183
|
end
|
|
179
184
|
|
|
180
185
|
def run_reporter
|
|
@@ -68,13 +68,25 @@ module DeployAngel
|
|
|
68
68
|
Array(tasks).filter_map do |key, task|
|
|
69
69
|
next unless task.is_a?(Hash) && task["schedule"]
|
|
70
70
|
|
|
71
|
-
{ "key" => key.to_s, "class" => task["class"]&.to_s, "schedule" => task["schedule"].to_s, "source" => "solid_queue",
|
|
71
|
+
schedule = { "key" => key.to_s, "class" => task["class"]&.to_s, "schedule" => task["schedule"].to_s, "source" => "solid_queue",
|
|
72
72
|
"time_zone" => scheduler_time_zone }
|
|
73
|
+
schedule["runs_as"] = command_job_class if task["class"].nil? && task["command"]
|
|
74
|
+
schedule
|
|
73
75
|
end
|
|
74
76
|
rescue StandardError
|
|
75
77
|
[]
|
|
76
78
|
end
|
|
77
79
|
|
|
80
|
+
# A command task runs as a job of this class, so its runs show up in
|
|
81
|
+
# job telemetry under that name.
|
|
82
|
+
def command_job_class
|
|
83
|
+
if defined?(::SolidQueue::RecurringTask) && ::SolidQueue::RecurringTask.respond_to?(:default_job_class)
|
|
84
|
+
::SolidQueue::RecurringTask.default_job_class&.name
|
|
85
|
+
end || "SolidQueue::RecurringJob"
|
|
86
|
+
rescue StandardError
|
|
87
|
+
"SolidQueue::RecurringJob"
|
|
88
|
+
end
|
|
89
|
+
|
|
78
90
|
# The zone Solid Queue reads a schedule in when the schedule names
|
|
79
91
|
# none: its own setting, config.time_zone by default. nil when that's
|
|
80
92
|
# the system's local time or Solid Queue predates the setting, and
|
data/lib/deployangel/version.rb
CHANGED