Class ExecutingDiscoveryRuns
- Namespace
- MailFathom.Application.Discovery.Streaming
- Assembly
- MailFathom.Application.dll
The runs this replica is executing, so a stop that lands here reaches the work rather than only the record.
public sealed class ExecutingDiscoveryRuns
- Inheritance
-
ExecutingDiscoveryRuns
- Inherited Members
Remarks
A run's output is rows and its bounds are the deployment's, so almost nothing about a run is per process any more. One thing still is: the run executes where it was started, and the cancellation that abandons its provider call and its retrieval is an object in that process. This holds those, and nothing else.
It is not how a stop is guaranteed to arrive. A stop request lands on whichever replica the load balancer chose, so what makes it reach the work is the record against the run: the executing replica is refused the next event it writes and cancels itself. Asking here as well is what makes a stop immediate on the replica that happens to hold the run, rather than a provider call late.
A run is registered for exactly as long as its execution lasts, which is what keeps this bounded without a sweep of its own: the launcher releases it in the same place it ends the run, and a process that went away holds nothing because it holds nothing at all.
Properties
- Count
Gets how many runs this replica is executing.
Methods
- Register(DiscoveryRunJournal)
Records that this replica has begun executing a run.
- Release(DiscoveryRunId)
Records that this replica has finished with a run, after which a stop reaches nothing here.
- TryRequestStop(DiscoveryRunId, UserId)
Asks a run this user started and this replica is executing to stop, where it is one.