Skip to content

Commit

Permalink
Add a Php::Duration data type
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Aug 19, 2021
1 parent 6697208 commit c893d81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions manifests/fpm/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
String $error_log = $php::params::fpm_error_log,
String $log_level = 'notice',
Integer $emergency_restart_threshold = 0,
Variant[Integer, Pattern[/^\d+[smhd]?$/]] $emergency_restart_interval = 0,
Variant[Integer, Pattern[/^\d+[smhd]?$/]] $process_control_timeout = 0,
Php::Duration $emergency_restart_interval = 0,
Php::Duration $process_control_timeout = 0,
Integer $process_max = 0,
Optional[Integer[1]] $rlimit_files = undef,
Optional[Variant[Integer,Pattern[/^\d+[smhd]?$/]]] $systemd_interval = undef,
Optional[Php::Duration] $systemd_interval = undef,
String $log_owner = $php::params::fpm_user,
String $log_group = $php::params::fpm_group,
Pattern[/^\d+$/] $log_dir_mode = '0770',
Expand Down
2 changes: 1 addition & 1 deletion manifests/fpm/pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
String[1] $pm_min_spare_servers = '5',
String[1] $pm_max_spare_servers = '35',
String[1] $pm_max_requests = '0',
String[1] $pm_process_idle_timeout = '10s',
Php::Duration $pm_process_idle_timeout = '10s',
Optional[Stdlib::Absolutepath] $pm_status_path = undef,
Optional[Stdlib::Absolutepath] $ping_path = undef,
String[1] $ping_response = 'pong',
Expand Down
6 changes: 6 additions & 0 deletions types/duration.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# A duration in seconds are with an unit
type Php::Duration = Variant[
Integer[1],
Pattern[/^\d+[smhd]?$/]
]

0 comments on commit c893d81

Please sign in to comment.