capistrano-solid_queue 0.1.0 → 0.1.2
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 +8 -0
- data/lib/capistrano/solid_queue/version.rb +1 -1
- data/lib/capistrano/solid_queue.rb +19 -2
- data/lib/capistrano/tasks/solid_queue.rake +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c04a8eebc3b4b5598a9eac1e362a1196778b43229f42d1f7734492794fd57207
|
4
|
+
data.tar.gz: b9dabd1aee6c8cee17eff11aab13a3f2324906bd394ea74cb406d93aca41d32a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fefa8f089252a38a0612cd7579a82245b17ae739ef3c7c358041945e68e661f219e7b939e5854e5145727da5f6afd5d6a5b4cde18f179073383f3eea2b4e660
|
7
|
+
data.tar.gz: 48b8ab02509a1e15855f0c1017d5adf2ebb2b68cdab91c213058bfa96a80f519e027d3505e271a5ee7263c47a2dca6b932736bae6f74772e5813477e3f0f6c32
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.1.2] - 2025-06-12
|
4
|
+
|
5
|
+
- Quiet task only runs on :solid_queue_role [#3](https://github.com/codeur/capistrano-solid_queue/pull/5) by [@bashcoder](https://github.com/bashcoder)
|
6
|
+
|
7
|
+
## [0.1.1] - 2025-03-27
|
8
|
+
|
9
|
+
- Fix system user [#2](https://github.com/codeur/capistrano-solid_queue/pull/2) by [@lubosch](https://github.com/lubosch)
|
10
|
+
|
3
11
|
## [0.1.0] - 2024-04-22
|
4
12
|
|
5
13
|
- Initial release
|
@@ -25,8 +25,25 @@ module Capistrano
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def execute_systemd(*args, raise_on_non_zero_exit: true)
|
28
|
-
|
29
|
-
|
28
|
+
sudo_if_needed(*systemd_command(*args), raise_on_non_zero_exit: true)
|
29
|
+
end
|
30
|
+
|
31
|
+
def sudo_if_needed(*command, raise_on_non_zero_exit: true)
|
32
|
+
if fetch(:solid_queue_systemctl_user) == :system
|
33
|
+
backend.sudo command.map(&:to_s).join(" ")
|
34
|
+
else
|
35
|
+
backend.execute(*command, raise_on_non_zero_exit: raise_on_non_zero_exit)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def systemd_command(*args)
|
40
|
+
command = ["/bin/systemctl"]
|
41
|
+
|
42
|
+
unless fetch(:solid_queue_systemctl_user) == :system
|
43
|
+
command << "--user"
|
44
|
+
end
|
45
|
+
|
46
|
+
command + args
|
30
47
|
end
|
31
48
|
|
32
49
|
def fetch_systemd_unit_path
|
@@ -60,7 +60,7 @@ namespace :solid_queue do # rubocop:disable Metrics
|
|
60
60
|
|
61
61
|
desc "Quiet solid_queue (start graceful termination)"
|
62
62
|
task :quiet do
|
63
|
-
on roles(:
|
63
|
+
on roles(fetch(:solid_queue_role)) do
|
64
64
|
plugin.execute_systemd("kill", "-s", "SIGTERM", fetch(:solid_queue_service_unit_name), raise_on_non_zero_exit: false)
|
65
65
|
end
|
66
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-solid_queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice TEXIER
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
68
|
+
rubygems_version: 3.5.22
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Adds support for SolidQueue to Capistrano 3.x
|