Fixed embeddings generation errors not propagating to response model in a user-friendly way, Fixed non-awaited SQL actions, Fixed connection pool filling up, fixed newly created searchdomain not found

This commit is contained in:
2026-02-19 03:00:46 +01:00
parent cda8c61429
commit 820ecbc83b
6 changed files with 31 additions and 22 deletions

View File

@@ -58,7 +58,7 @@ public class SearchdomainManager : IDisposable
}
try
{
return SetSearchdomain(searchdomain, new Searchdomain(searchdomain, connectionString, aIProvider, embeddingCache, _logger));
return SetSearchdomain(searchdomain, new Searchdomain(searchdomain, connectionString, helper, aIProvider, embeddingCache, _logger));
}
catch (MySqlException)
{
@@ -101,7 +101,9 @@ public class SearchdomainManager : IDisposable
{ "name", searchdomain },
{ "settings", settings}
};
return await helper.ExecuteSQLCommandGetInsertedID("INSERT INTO searchdomain (name, settings) VALUES (@name, @settings)", parameters);
int id = await helper.ExecuteSQLCommandGetInsertedID("INSERT INTO searchdomain (name, settings) VALUES (@name, @settings)", parameters);
searchdomains.Add(searchdomain, new(searchdomain, connectionString, helper, aIProvider, embeddingCache, _logger));
return id;
}
public async Task<int> DeleteSearchdomain(string searchdomain)