Skip to content

Commit

Permalink
Passing models to Barman diagnose method.
Browse files Browse the repository at this point in the history
The signature has changed, changing accordingly.
  • Loading branch information
gonzalemario committed Jan 24, 2024
1 parent 510a2d7 commit 457fc88
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pg_backup_api/pg_backup_api/logic/utility_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,18 @@ def diagnose() -> 'Response':
else:
server_dict[server] = Server(conf)

available_models = barman.__config__.model_names()
model_dict = {}
for model in available_models: # pyright: ignore
model_dict[model] = barman.__config__.get_model(model)

# errors list with duplicate paths between servers
errors_list = barman.__config__.servers_msg_list

barman_diagnose.exec_diagnose(server_dict, errors_list)
barman_diagnose.exec_diagnose(server_dict,
model_dict,
errors_list,
show_config_source=False)

# new outputs are appended, so grab the last one
stored_output = json.loads(output._writer.json_output["_INFO"][-1])
Expand Down

0 comments on commit 457fc88

Please sign in to comment.