feat(data): add usage gate thresholds and task run model column

Adds AppSettings.UsageGateFiveHourPct/UsageGateSevenDayPct (defaults
80/90, clamped 0..100 in UpdateAsync) and a nullable TaskRunEntity.Model
column, laying the data foundation for the usage monitor. No worker/UI
changes.
This commit is contained in:
mika kuns
2026-08-05 09:51:42 +02:00
parent 8d7ba1e314
commit bedd2defbb
10 changed files with 1039 additions and 3 deletions
@@ -27,6 +27,7 @@ public class TaskRunEntityConfiguration : IEntityTypeConfiguration<TaskRunEntity
builder.Property(r => r.LogPath).HasColumnName("log_path");
builder.Property(r => r.StartedAt).HasColumnName("started_at");
builder.Property(r => r.FinishedAt).HasColumnName("finished_at");
builder.Property(r => r.Model).HasColumnName("model");
builder.HasOne(r => r.Task)
.WithMany(t => t.Runs)