dlss-capistrano 5.2.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/dlss-capistrano.gemspec +1 -1
- data/lib/dlss/capistrano/tasks/solid_queue_systemd.rake +44 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c20ce3abcea6996c7366473874dbd9b7106749c5e7b365d21e301195ead06830
|
4
|
+
data.tar.gz: 75a94eb0b169763cd62e7dd92bcb8b183d7621e5ea271613c06b7b4814835c7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18fc1a359d2bffa0f474b4e3eaa4d00010e01bddf6eb37dde993512c1f3076ed861b5ff79d955afa8a406d125c95feb5a9b91561a02d81561484c0e802a03b9
|
7
|
+
data.tar.gz: c03fd209a7440b754cad93ed9b671cd3554d86804c358bc7aa0b65fb2c46a99d6b518b3baab57719da1784fe42c85d03b55d5602f56a8810fbf13cb2e56a0f9b
|
data/README.md
CHANGED
@@ -81,6 +81,10 @@ These tasks are intended to replace those provided by `capistrano-sidekiq` gem,
|
|
81
81
|
|
82
82
|
`cap ENV sneakers_systemd:{stop,start,restart}`: stops, starts, restarts Sneakers via systemd.
|
83
83
|
|
84
|
+
### SolidQueue via systemd
|
85
|
+
|
86
|
+
`cap ENV solid_queue_systemd:{stop,start,restart}`: stops, starts, restarts SolidQueue via systemd.
|
87
|
+
|
84
88
|
### Racecar via systemd
|
85
89
|
|
86
90
|
`cap ENV racecar_systemd:{stop,start,restart}`: stops, starts, restarts Racecar via systemd.
|
data/dlss-capistrano.gemspec
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Capistrano plugin hook to set default values
|
2
|
+
namespace :load do
|
3
|
+
task :defaults do
|
4
|
+
set :solid_queue_systemd_role, fetch(:solid_queue_systemd_role, :app)
|
5
|
+
set :solid_queue_systemd_use_hooks, fetch(:solid_queue_systemd_use_hooks, false)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
# Integrate solid_queue hooks into Capistrano
|
10
|
+
namespace :deploy do
|
11
|
+
before :starting, :add_solid_queue_systemd_hooks do
|
12
|
+
invoke 'solid_queue_systemd:add_hooks' if fetch(:solid_queue_systemd_use_hooks)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
namespace :solid_queue_systemd do
|
17
|
+
# NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
|
18
|
+
task :add_hooks do
|
19
|
+
after 'deploy:failed', 'solid_queue_systemd:restart'
|
20
|
+
after 'deploy:published', 'solid_queue_systemd:start'
|
21
|
+
after 'deploy:starting', 'solid_queue_systemd:stop'
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Stop running workers gracefully'
|
25
|
+
task :stop do
|
26
|
+
on roles(fetch(:solid_queue_systemd_role)) do
|
27
|
+
sudo :systemctl, 'stop', 'solid_queue'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
desc 'Start workers'
|
32
|
+
task :start do
|
33
|
+
on roles(fetch(:solid_queue_systemd_role)) do
|
34
|
+
sudo :systemctl, 'start', 'solid_queue'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
desc 'Restart workers'
|
39
|
+
task :restart do
|
40
|
+
on roles(fetch(:solid_queue_systemd_role)) do
|
41
|
+
sudo :systemctl, 'restart', 'solid_queue', raise_on_non_zero_exit: false
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dlss-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/dlss/capistrano/tasks/setup/setup.rake
|
123
123
|
- lib/dlss/capistrano/tasks/sidekiq_systemd.rake
|
124
124
|
- lib/dlss/capistrano/tasks/sneakers_systemd.rake
|
125
|
+
- lib/dlss/capistrano/tasks/solid_queue_systemd.rake
|
125
126
|
- lib/dlss/capistrano/tasks/ssh.rake
|
126
127
|
- lib/dlss/capistrano/tasks/ssh_check.rake
|
127
128
|
- lib/dlss/capistrano/tasks/strscan.rake
|
@@ -145,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: 1.3.6
|
147
148
|
requirements: []
|
148
|
-
rubygems_version: 3.5.
|
149
|
+
rubygems_version: 3.5.16
|
149
150
|
signing_key:
|
150
151
|
specification_version: 4
|
151
152
|
summary: Capistrano recipes for use in SUL/DLSS projects
|