Skip to content

Commit

Permalink
only allow true or empty for LOG_SHIP_HOURLY variable
Browse files Browse the repository at this point in the history
  • Loading branch information
FxKu committed Oct 9, 2024
1 parent a63ea8d commit 30c3cfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions postgres-appliance/scripts/configure_spilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,10 @@ def get_placeholders(provider):
placeholders.setdefault('LOG_BUCKET_SCOPE_SUFFIX', '')

# only accept true as value or else it will be empty = disabled
if placeholders['LOG_SHIP_HOURLY']:
placeholders['LOG_SHIP_HOURLY'] = str(os.environ.get('LOG_SHIP_HOURLY', '') in ['true', 'TRUE'])
if placeholders['LOG_SHIP_HOURLY'] and os.environ.get('LOG_SHIP_HOURLY').lower() == 'true':
placeholders['LOG_SHIP_HOURLY'] = 'true'
else:
placeholders['LOG_SHIP_HOURLY'] = ''

# see comment for wal-e bucket prefix
placeholders.setdefault('LOG_BUCKET_SCOPE_PREFIX', '{0}-'.format(placeholders['NAMESPACE'])
Expand Down

0 comments on commit 30c3cfb

Please sign in to comment.