Skip to content

Commit 0ba3601

Browse files
author
Thomas Mahlberg
committed
put the wait statement at the end
1 parent acd9036 commit 0ba3601

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

KustoSchemaTools/Parser/KustoWriter/DefaultDatabaseWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ private async Task<ScriptExecuteCommandResult> ExecuteAsyncCommand(string databa
8181
}
8282

8383
logger.LogInformation($"Waiting for operation {operationId} to complete... current iteration: {cnt}/3600");
84-
await Task.Delay(1000);
8584
var monitoringResult = client.Client.ExecuteQuery(databaseName, monitoringCommand, new Kusto.Data.Common.ClientRequestProperties());
8685
var operationState = monitoringResult.As<ScriptExecuteCommandResult>().FirstOrDefault();
8786

@@ -90,6 +89,7 @@ private async Task<ScriptExecuteCommandResult> ExecuteAsyncCommand(string databa
9089
operationState.CommandText = sc.Text;
9190
return operationState;
9291
}
92+
await Task.Delay(1000);
9393
}
9494
throw new Exception("Operation did not complete in a reasonable time");
9595
}

0 commit comments

Comments
 (0)