Recover missed work after an absence by the rules of SPEC 5.6 (refs #49)
At the start the host measures how long the bot was away from the last job that finished, records the absence and writes it in the diary; one longer than a day is kept for the Panoramica until the user has seen it. A job can now say how a run missed while the bot was off is treated: the nightly backup, the exchange rates, the market calendar and the cleanup run once at the restart, queued, however late; a job with a deadline is skipped past it and the diary says so. Corporate actions are read before the reconciliation puts any stop back. A decision the engine makes late because of an absence is written in the diary as recovered, as are the orders it releases late; entries that moved too far or expired are dropped with their reason. Tests switch the bot off for 3 hours, 20 hours and 3 days with a manual clock and check each of those rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41e067e7d1
commit
680cab4bb6
9 files changed
+454
-18
No files matched your search
@@ -134,7 +134,7 @@ internal sealed class StockRig : IAsyncDisposable
|
||||
|
||||
private DailyBar? Bar(string symbol, DateOnly day) => Bars[symbol].SingleOrDefault(b => b.Day == day);
|
||||
|
||||
private void Quotes(DateOnly day, Func<DailyBar, double> pick)
|
||||
public void Quotes(DateOnly day, Func<DailyBar, double> pick)
|
||||
{
|
||||
foreach (var symbol in Bars.Keys)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ internal sealed class StockRig : IAsyncDisposable
|
||||
}
|
||||
}
|
||||
|
||||
private async Task MinutesAsync(int count)
|
||||
public async Task MinutesAsync(int count)
|
||||
{
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user