File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ function getConfig (value) {
130130 config . migrate = ( 'migrate' in config ) ? config . migrate : true
131131
132132 applySchemaConfig ( config )
133- applyMaintenanceConfig ( config )
133+ applyOpsConfig ( config )
134134 applyScheduleConfig ( config )
135135 validateWarningConfig ( config )
136136
@@ -201,7 +201,15 @@ function applyPollingInterval (config) {
201201 : 2000
202202}
203203
204- function applyMaintenanceConfig ( config ) {
204+ function applyOpsConfig ( config ) {
205+ assert ( ! ( 'superviseIntervalSeconds' in config ) || config . superviseIntervalSeconds >= 1 ,
206+ 'configuration assert: superviseIntervalSeconds must be at least every second' )
207+
208+ config . superviseIntervalSeconds = config . superviseIntervalSeconds || 60
209+
210+ assert ( config . superviseIntervalSeconds / 60 / 60 <= POLICY . MAX_EXPIRATION_HOURS ,
211+ `configuration assert: superviseIntervalSeconds cannot exceed ${ POLICY . MAX_EXPIRATION_HOURS } hours` )
212+
205213 assert ( ! ( 'maintenanceIntervalSeconds' in config ) || config . maintenanceIntervalSeconds >= 1 ,
206214 'configuration assert: maintenanceIntervalSeconds must be at least every second' )
207215
You can’t perform that action at this time.
0 commit comments