make the message processing truely async (#1596)

This commit is contained in:
Alan Ren
2022-07-21 16:58:03 -07:00
committed by GitHub
parent fc2d1300fd
commit 08c74be51f
2 changed files with 44 additions and 36 deletions

View File

@@ -1211,7 +1211,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
parameters.OwnerUri,
out connInfo);
result.Success = true;
result.Notebooks = AgentNotebookHelper.GetAgentNotebooks(connInfo).Result;
result.Notebooks = await AgentNotebookHelper.GetAgentNotebooks(connInfo);
}
catch (Exception e)
{
@@ -1260,7 +1260,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
ConnectionServiceInstance.TryFindConnection(
parameters.OwnerUri,
out connInfo);
result.NotebookMaterialized = AgentNotebookHelper.GetMaterializedNotebook(connInfo, parameters.NotebookMaterializedId, parameters.TargetDatabase).Result;
result.NotebookMaterialized = await AgentNotebookHelper.GetMaterializedNotebook(connInfo, parameters.NotebookMaterializedId, parameters.TargetDatabase);
result.Success = true;
}
catch (Exception e)