Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
zlianzhuang authored and github-actions[bot] committed Sep 26, 2023
1 parent d855071 commit 48fb4fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
def current_time() -> str:
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())


def timer_cluster(
meta: kopf.Meta,
spec: kopf.Spec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ def update_action(
spec, meta, patch,
pgsql_util.get_field(POSTGRESQL, READONLYINSTANCE), False,
None, logger, None, status, False)
if pgsql_util.in_disaster_backup(meta, spec, patch, status, logger) == True:
conns += [ readwrite_conns.get_conns()[0] ]
if pgsql_util.in_disaster_backup(meta, spec, patch, status,
logger) == True:
conns += [readwrite_conns.get_conns()[0]]
else:
conns += readwrite_conns.get_conns()
conns += readonly_conns.get_conns()
Expand All @@ -226,7 +227,8 @@ def update_action(
pgsql_util.postgresql_action(meta, spec, patch, status, logger,
conn, start)

if NEW == ACTION_START and pgsql_util.in_disaster_backup(meta, spec, patch, status, logger) == False:
if NEW == ACTION_START and pgsql_util.in_disaster_backup(
meta, spec, patch, status, logger) == False:
pgsql_util.waiting_postgresql_ready(readwrite_conns, logger)
pgsql_util.waiting_postgresql_ready(readonly_conns, logger)
pgsql_util.waiting_cluster_final_status(
Expand Down

0 comments on commit 48fb4fa

Please sign in to comment.