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
@@ -65,6 +65,8 @@ public sealed class AppSettingsRepository
row.StandupWeekday = updated.StandupWeekday;
row.DailyPrepMaxTasks = updated.DailyPrepMaxTasks < 1 ? 1 : updated.DailyPrepMaxTasks;
row.SessionSkills = string.IsNullOrWhiteSpace(updated.SessionSkills) ? null : updated.SessionSkills;
row.UsageGateFiveHourPct = Math.Clamp(updated.UsageGateFiveHourPct, 0, 100);
row.UsageGateSevenDayPct = Math.Clamp(updated.UsageGateSevenDayPct, 0, 100);
await _context.SaveChangesAsync(ct);
}