add variable to prune.env
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
# @param [Boolean] ps_dry_run (true = just log, false = actually delete blocks)
|
# @param [Boolean] ps_dry_run (true = just log, false = actually delete blocks)
|
||||||
# @param [String] ps_min_age_hours Minimum block age in hours before pruning
|
# @param [String] ps_min_age_hours Minimum block age in hours before pruning
|
||||||
# @param [String] ps_grace_hours Grace period in hours to be extra safe
|
# @param [String] ps_grace_hours Grace period in hours to be extra safe
|
||||||
|
# @param [String] ps_sql_template the SQL template to use for checks.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class prometheus_cd::params (
|
class prometheus_cd::params (
|
||||||
|
|
||||||
@@ -98,6 +99,7 @@ class prometheus_cd::params (
|
|||||||
Boolean $ps_dry_run = true,
|
Boolean $ps_dry_run = true,
|
||||||
String $ps_min_age_hours = '4',
|
String $ps_min_age_hours = '4',
|
||||||
String $ps_grace_hours = '1',
|
String $ps_grace_hours = '1',
|
||||||
|
String $ps_sql_template = 'Changeme',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# defaults
|
# defaults
|
||||||
|
|||||||
@@ -17,4 +17,5 @@ MIN_AGE_HOURS=<%= @ps_min_age_hours %>
|
|||||||
GRACE_HOURS=<%= @ps_grace_hours %>
|
GRACE_HOURS=<%= @ps_grace_hours %>
|
||||||
|
|
||||||
# SQL template to check if block exists in PostgreSQL
|
# SQL template to check if block exists in PostgreSQL
|
||||||
CHECK_SQL_TEMPLATE="SELECT 1 FROM metric_values WHERE metric_time >= to_timestamp({min}/1000.0) AND metric_time <= to_timestamp({max}/1000.0) LIMIT 1;"
|
# @param [String] ps_sql_template the SQL template to use for checks.
|
||||||
|
<%= @ps_sql_template %>
|
||||||
Reference in New Issue
Block a user