Skip to content

Commit d2105a0

Browse files
committed
Add a Php::Duration data type
1 parent 6697208 commit d2105a0

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

manifests/fpm/config.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@
8282
String $error_log = $php::params::fpm_error_log,
8383
String $log_level = 'notice',
8484
Integer $emergency_restart_threshold = 0,
85-
Variant[Integer, Pattern[/^\d+[smhd]?$/]] $emergency_restart_interval = 0,
86-
Variant[Integer, Pattern[/^\d+[smhd]?$/]] $process_control_timeout = 0,
85+
Php::Duration $emergency_restart_interval = 0,
86+
Php::Duration $process_control_timeout = 0,
8787
Integer $process_max = 0,
8888
Optional[Integer[1]] $rlimit_files = undef,
89-
Optional[Variant[Integer,Pattern[/^\d+[smhd]?$/]]] $systemd_interval = undef,
89+
Optional[Php::Duration] $systemd_interval = undef,
9090
String $log_owner = $php::params::fpm_user,
9191
String $log_group = $php::params::fpm_group,
9292
Pattern[/^\d+$/] $log_dir_mode = '0770',

manifests/fpm/pool.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
String[1] $pm_min_spare_servers = '5',
138138
String[1] $pm_max_spare_servers = '35',
139139
String[1] $pm_max_requests = '0',
140-
String[1] $pm_process_idle_timeout = '10s',
140+
Php::Duration $pm_process_idle_timeout = '10s',
141141
Optional[Stdlib::Absolutepath] $pm_status_path = undef,
142142
Optional[Stdlib::Absolutepath] $ping_path = undef,
143143
String[1] $ping_response = 'pong',

types/duration.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# A duration in seconds are with an unit
2+
type Php::Duration = Variant[
3+
Integer[0],
4+
Pattern[/^\d+[smhd]?$/]
5+
]
6+

0 commit comments

Comments
 (0)