Revert "fix(data): give both processes a SQLite busy timeout"
This reverts commit f62dbb9239.
This commit is contained in:
@@ -91,11 +91,8 @@ sealed class Program
|
|||||||
TrExtension.Localizer = localizer;
|
TrExtension.Localizer = localizer;
|
||||||
ClaudeDo.Ui.Localization.Loc.Current = localizer;
|
ClaudeDo.Ui.Localization.Loc.Current = localizer;
|
||||||
sc.AddSingleton<ILocalizer>(localizer);
|
sc.AddSingleton<ILocalizer>(localizer);
|
||||||
// Default Timeout maps to SQLite's busy handler. Without it a momentarily locked
|
|
||||||
// database throws SqliteException immediately instead of waiting out the writer,
|
|
||||||
// which is what leaves task rows stuck on a stale status.
|
|
||||||
sc.AddDbContextFactory<ClaudeDoDbContext>(opt =>
|
sc.AddDbContextFactory<ClaudeDoDbContext>(opt =>
|
||||||
opt.UseSqlite($"Data Source={dbPath};Default Timeout=30"));
|
opt.UseSqlite($"Data Source={dbPath}"));
|
||||||
sc.AddScoped<ClaudeDoDbContext>(sp =>
|
sc.AddScoped<ClaudeDoDbContext>(sp =>
|
||||||
sp.GetRequiredService<IDbContextFactory<ClaudeDoDbContext>>().CreateDbContext());
|
sp.GetRequiredService<IDbContextFactory<ClaudeDoDbContext>>().CreateDbContext());
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,8 @@ builder.Host.UseSerilog((ctx, lc) => lc
|
|||||||
.WriteTo.Sink(broadcastSink));
|
.WriteTo.Sink(broadcastSink));
|
||||||
builder.Services.AddSingleton(logBuffer);
|
builder.Services.AddSingleton(logBuffer);
|
||||||
|
|
||||||
// See ClaudeDo.App/Program.cs — Default Timeout maps to SQLite's busy handler.
|
|
||||||
builder.Services.AddDbContextFactory<ClaudeDoDbContext>(opt =>
|
builder.Services.AddDbContextFactory<ClaudeDoDbContext>(opt =>
|
||||||
opt.UseSqlite($"Data Source={cfg.DbPath};Default Timeout=30"));
|
opt.UseSqlite($"Data Source={cfg.DbPath}"));
|
||||||
|
|
||||||
builder.Services.AddSingleton(cfg);
|
builder.Services.AddSingleton(cfg);
|
||||||
builder.Services.AddSingleton<AttachmentStore>();
|
builder.Services.AddSingleton<AttachmentStore>();
|
||||||
|
|||||||
Reference in New Issue
Block a user