Issue #10: implement worker process launcher
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
namespace MxGateway.Server.Workers;
|
||||
|
||||
public sealed class WorkerProcessHandle : IDisposable
|
||||
{
|
||||
public WorkerProcessHandle(
|
||||
IWorkerProcess process,
|
||||
WorkerProcessCommandLine commandLine,
|
||||
DateTimeOffset launchedAt)
|
||||
{
|
||||
Process = process;
|
||||
ProcessId = process.Id;
|
||||
CommandLine = commandLine;
|
||||
LaunchedAt = launchedAt;
|
||||
}
|
||||
|
||||
public IWorkerProcess Process { get; }
|
||||
|
||||
public int ProcessId { get; }
|
||||
|
||||
public WorkerProcessCommandLine CommandLine { get; }
|
||||
|
||||
public DateTimeOffset LaunchedAt { get; }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Process.Dispose();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user