Skip to content

Commit

Permalink
Fix wals_to_upload config value getting in upload_wals plugin (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicpopov authored Jun 1, 2024
1 parent 5340ac4 commit 0c3d05e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/upload_wals.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def after_promote(self, conn, config):
wals_to_upload.append(wal)
except (struct.error, ValueError):
continue
wals_count = config.get('plugins', 'wals_to_upload')
wals_count = config.getint('plugins', 'wals_to_upload')
for wal in wals_to_upload[-wals_count:]:
path = '{pgdata}/{wal_dir}/{wal}'.format(pgdata=pgdata, wal_dir=wal_dir, wal=wal)
cmd = archive_command.replace('%p', path).replace('%f', wal)
Expand Down

0 comments on commit 0c3d05e

Please sign in to comment.