We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78ef486 commit e4015bfCopy full SHA for e4015bf
src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbBuilderExtensions.cs
@@ -130,7 +130,18 @@ CancellationToken ct
130
await CreateNamespaceAsync(surrealClient, surrealDbNamespace, services, ct)
131
.ConfigureAwait(false);
132
133
- await surrealClient.Use(surrealDbNamespace.NamespaceName, null!, ct).ConfigureAwait(false);
+ // 💡 Wait until the Namespace is really created?!
134
+ while (!ct.IsCancellationRequested)
135
+ {
136
+ try
137
138
+ await surrealClient.Use(surrealDbNamespace.NamespaceName, null!, ct).ConfigureAwait(false);
139
+ }
140
+ catch
141
142
+ await Task.Delay(200, ct).ConfigureAwait(false);
143
144
145
146
foreach (var dbResourceName in surrealDbNamespace.Databases.Keys)
147
{
0 commit comments