Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Expose GOVUK_DATA_SYNC_PERIOD ENV variable for govuk_app_config
Browse files Browse the repository at this point in the history
This is to enable alphagov/govuk_app_config#160,
which ignores certain exceptions if they occur during the data
sync period. We want to set this via Puppet so that it is DRY and
configured in only one place.

Trello: https://trello.com/c/rAlvGlSp/2123-5-ignore-data-sync-errors-in-govukappconfig
  • Loading branch information
ChrisBAshton committed Oct 16, 2020
1 parent 234a4c6 commit 507464a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/govuk_data_sync_in_progress/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
$fact_path = '/etc/govuk/env.d/FACTER_data_sync_in_progress'

$start_hour = 22
$start_minute = 0
$start_minute = 00

$finish_hour = 8
$finish_minute = 00

govuk::app::envvar { "${title}-GOVUK_DATA_SYNC_PERIOD":
varname => "GOVUK_DATA_SYNC_PERIOD",
value => "${start_hour}:${start_minute}-${finish_hour}:${finish_minute}";
}

if !defined(File[$fact_path]) {
file { $fact_path:
ensure => present,
Expand Down

0 comments on commit 507464a

Please sign in to comment.