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
@@ -213,6 +213,15 @@ internal sealed class LiveRig : IAsyncDisposable
|
||||
await Equity.TakeAsync(none).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>Several minutes of the process from the clock's time.</summary>
|
||||
public async Task MinutesAsync(int count)
|
||||
{
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
await MinuteAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>One minute of the process: the engine's pulse, then a turn of the simulator and of the order manager.</summary>
|
||||
private async Task MinuteAsync()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user