feat(batch3): implement service feature group
This commit is contained in:
@@ -220,12 +220,17 @@ public static class SignalHandler
|
||||
/// <summary>
|
||||
/// Runs the server (non-Windows). Mirrors <c>Run</c> in service.go.
|
||||
/// </summary>
|
||||
public static void Run(Action startServer) => startServer();
|
||||
public static void Run(Action startServer)
|
||||
{
|
||||
var error = ServiceManager.Run(startServer);
|
||||
if (error is not null)
|
||||
throw error;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns false on non-Windows. Mirrors <c>isWindowsService</c>.
|
||||
/// </summary>
|
||||
public static bool IsWindowsService() => false;
|
||||
public static bool IsWindowsService() => ServiceManager.IsWindowsService();
|
||||
}
|
||||
|
||||
/// <summary>Unix signal codes for NATS command mapping.</summary>
|
||||
|
||||
Reference in New Issue
Block a user