mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Make sure WAL-E restore script returns 1 if criterias to use WAL-E were not met.
This commit is contained in:
@@ -63,13 +63,9 @@ class WALERestore(object):
|
||||
|
||||
def run(self):
|
||||
""" creates a new replica using WAL-E """
|
||||
ret = self.replica_method()
|
||||
return ret
|
||||
|
||||
def replica_method(self):
|
||||
if self.should_use_s3_to_create_replica():
|
||||
return self.create_replica_with_s3()
|
||||
return None
|
||||
return 2
|
||||
|
||||
def should_use_s3_to_create_replica(self):
|
||||
""" determine whether it makes sense to use S3 and not pg_basebackup """
|
||||
|
||||
Reference in New Issue
Block a user