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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 370e3cf6d4f61aa91a4019e015b4bd28cac1c41351fb49db1b61cb33016fd702
4
- data.tar.gz: 11e2a96aea88eb3fb78a681448aa79ff33ced9275ca6599d9538388054e2847b
3
+ metadata.gz: d588875160dbea91b36102b048470c0445b3360afc3621ca988d7c379f935fa3
4
+ data.tar.gz: d129c1ed1b7a16578b38716219956d6a1e9dcff4d2c8cbf758ff5edcea8a4355
5
5
  SHA512:
6
- metadata.gz: 7814d7b8f9f73efe86bdfaf4a790b9f87e8081e54b7016d6e72bd2d42b89dbd0ef865269beebcbaca9366c5c73cb7d9103c50830069a3c05ed74375ab74d4371
7
- data.tar.gz: ad48bb685b5215252af180150db21bc3f61063cb765cce1bcaf49adbca1615ff935c63668aa7773082372faee59de0569e09c184d430d43f3885e32a37f2ffc0
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
- if fetch(:puma_systemctl_user) == :system
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.0.0
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.3
99
+ rubygems_version: 4.0.10
100
100
  specification_version: 4
101
101
  summary: Puma integration for Capistrano
102
102
  test_files: []