capistrano3-puma 8.0.0 → 8.1.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/README.md +11 -0
- data/lib/capistrano/puma/systemd.rb +1 -0
- data/lib/capistrano/tasks/systemd.rake +3 -5
- 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: d588875160dbea91b36102b048470c0445b3360afc3621ca988d7c379f935fa3
|
|
4
|
+
data.tar.gz: d129c1ed1b7a16578b38716219956d6a1e9dcff4d2c8cbf758ff5edcea8a4355
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 971eb199834a65c274c6abce1cc729bb008b64c4753b511722d70c08507aec600b77299f2ae8c47a430365afbeb48ae4fcb627ba417f118350a33fea9ede673d
|
|
7
|
+
data.tar.gz: ac83b265f25dfac84e039ff38aef5e568d696ee47a669b8653019f3ab9b214f7ae94f39e0eb6ae391fbb8114a70e762100a7f9c887e6744977853c519633426e
|
data/README.md
CHANGED
|
@@ -180,8 +180,19 @@ Configurable options, shown here with defaults: Please note the configuration op
|
|
|
180
180
|
set :puma_service_unit_env_files, []
|
|
181
181
|
set :puma_service_unit_env_vars, []
|
|
182
182
|
set :puma_service_unit_props, [] # Set extral puma service properties, such as ["MemoryMax=2G","TimeoutAbortSec=30"]
|
|
183
|
+
set :puma_systemctl_reload_options, [] # Extra flags passed to `systemctl reload`, e.g. ["--no-block"]
|
|
183
184
|
```
|
|
184
185
|
|
|
186
|
+
`puma_systemctl_reload_options` is an array of extra flags appended to the `systemctl reload`
|
|
187
|
+
command (empty by default). The flags are applied to `reload` only; the `restart` fallback,
|
|
188
|
+
used when the service is not running, is left untouched.
|
|
189
|
+
|
|
190
|
+
For example, with the default `Type=notify` service, `systemctl reload` waits for the phased
|
|
191
|
+
restart to finish and every worker to re-signal readiness before it returns. Passing
|
|
192
|
+
`%w[--no-block]` makes systemd enqueue the reload and return immediately instead. This is a
|
|
193
|
+
trade-off — the deploy no longer waits on the reload, so it will not surface a failed restart;
|
|
194
|
+
use it only when your rollout is verified by other means.
|
|
195
|
+
|
|
185
196
|
__Notes:__ If you are setting values for variables that might be used by other plugins, use `append` instead of `set`. For example:
|
|
186
197
|
```ruby
|
|
187
198
|
append :rbenv_map_bins, 'puma', 'pumactl'
|
|
@@ -15,6 +15,7 @@ module Capistrano
|
|
|
15
15
|
set_if_empty :puma_service_unit_name, -> { "#{fetch(:application)}_puma_#{fetch(:stage)}" }
|
|
16
16
|
set_if_empty :puma_enable_socket_service, false
|
|
17
17
|
set_if_empty :puma_systemd_watchdog_sec, 10
|
|
18
|
+
set_if_empty :puma_systemctl_reload_options, -> { fetch(:systemctl_reload_options, []) }
|
|
18
19
|
|
|
19
20
|
set_if_empty :puma_service_unit_env_files, -> { fetch(:service_unit_env_files, []) }
|
|
20
21
|
set_if_empty :puma_service_unit_env_vars, -> { fetch(:service_unit_env_vars, []) }
|
|
@@ -118,14 +118,12 @@ namespace :puma do
|
|
|
118
118
|
execute("#{fetch(:puma_systemctl_bin)} --user status #{fetch(:puma_service_unit_name)} > /dev/null", raise_on_non_zero_exit: false)
|
|
119
119
|
end
|
|
120
120
|
cmd = 'reload'
|
|
121
|
+
opts = Array(fetch(:puma_systemctl_reload_options))
|
|
121
122
|
unless service_ok
|
|
122
123
|
cmd = 'restart'
|
|
124
|
+
opts = []
|
|
123
125
|
end
|
|
124
|
-
|
|
125
|
-
sudo "#{fetch(:puma_systemctl_bin)} #{cmd} #{fetch(:puma_service_unit_name)}"
|
|
126
|
-
else
|
|
127
|
-
execute "#{fetch(:puma_systemctl_bin)}", "--user", cmd, fetch(:puma_service_unit_name)
|
|
128
|
-
end
|
|
126
|
+
git_plugin.execute_systemd(*opts, cmd, fetch(:puma_service_unit_name))
|
|
129
127
|
end
|
|
130
128
|
end
|
|
131
129
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano3-puma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.
|
|
4
|
+
version: 8.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abdelkader Boudih
|
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
97
|
version: '0'
|
|
98
98
|
requirements: []
|
|
99
|
-
rubygems_version: 4.0.
|
|
99
|
+
rubygems_version: 4.0.10
|
|
100
100
|
specification_version: 4
|
|
101
101
|
summary: Puma integration for Capistrano
|
|
102
102
|
test_files: []
|