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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 506c54e0736ba7c8d957d70eac27e0c87afac59efaf6661474d583633324af17
4
- data.tar.gz: 467a54901a05725308adf64eacd926c6bee8788daa9c6c779ef053e178e51f8a
3
+ metadata.gz: c20ce3abcea6996c7366473874dbd9b7106749c5e7b365d21e301195ead06830
4
+ data.tar.gz: 75a94eb0b169763cd62e7dd92bcb8b183d7621e5ea271613c06b7b4814835c7d
5
5
  SHA512:
6
- metadata.gz: 21c6a06bf65ea3a5df664de92e72c4030dce9bd281834863eda9205f4e2fa96b49753c2a5f8b36efec1f72fcfaef9ba559e3513f9efe09212e1584f7c25c7d57
7
- data.tar.gz: 961902bb30a3e69e262ef12f140bf34fdee71d32c8f79eb9c3949ddcd32fa6f9c7160b52b349b7114f7535245b8420d61a7ec41e25afec98414f59000f55afe7
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.
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "dlss-capistrano"
7
- s.version = '5.2.0'
7
+ s.version = '5.3.0'
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["Chris Beer", 'Mike Giarlo']
@@ -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.2.0
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-07-11 00:00:00.000000000 Z
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.15
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