Skip to content

Commit b3c86a8

Browse files
author
Antoni Borowski
committed
Fix GothenburgBitFactory#3571: Added detailed feedback for successful task synchronization
1 parent 1c9dddc commit b3c86a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/commands/CmdSync.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ int CmdSync::execute(std::string& output) {
8585
out << format("Syncing with {1}", server_dir) << '\n';
8686
}
8787
replica->sync_to_local(server_dir, avoid_snapshots);
88+
89+
out << format("Synced with {1}", server_dir) << '\n';
8890
} else if (aws_bucket != "") {
8991
std::string aws_region = Context::getContext().config.get("sync.aws.region");
9092
std::string aws_profile = Context::getContext().config.get("sync.aws.profile");
@@ -132,6 +134,8 @@ int CmdSync::execute(std::string& output) {
132134
replica->sync_to_aws_with_default_creds(aws_region, aws_bucket, encryption_secret,
133135
avoid_snapshots);
134136
}
137+
138+
out << format("Synced with AWS bucket {1}", aws_bucket) << '\n';
135139
} else if (gcp_bucket != "") {
136140
std::string gcp_credential_path = Context::getContext().config.get("sync.gcp.credential_path");
137141
if (encryption_secret == "") {
@@ -141,6 +145,8 @@ int CmdSync::execute(std::string& output) {
141145
out << format("Syncing with GCP bucket {1}", gcp_bucket) << '\n';
142146
}
143147
replica->sync_to_gcp(gcp_bucket, gcp_credential_path, encryption_secret, avoid_snapshots);
148+
149+
out << format("Synced with GCP bucket {1}", gcp_bucket) << '\n';
144150
} else if (server_url != "") {
145151
if (client_id == "" || encryption_secret == "") {
146152
throw std::string("sync.server.client_id and sync.encryption_secret are required");
@@ -150,6 +156,8 @@ int CmdSync::execute(std::string& output) {
150156
}
151157
replica->sync_to_remote(server_url, tc::uuid_from_string(client_id), encryption_secret,
152158
avoid_snapshots);
159+
160+
out << format("Synced with sync server at {1}", server_url) << '\n';
153161
} else {
154162
throw std::string("No sync.* settings are configured. See task-sync(5).");
155163
}

0 commit comments

Comments
 (0)