private static void StopSilo() { _log.Information("Stopping orleans silo host"); _silo.StopAsync().GetAwaiter().GetResult(); _silo.Dispose(); _log.Information("Orleans silo host stopped"); }
public void Stop() { if (_serviceArguments == null) { return; } var cancelAfter = new CancellationTokenSource(TimeSpan.FromSeconds(_serviceArguments.OnStopWaitTimeSec.Value)).Token; try { HttpServiceListener?.Dispose(); } catch (Exception e) { Log.Warn((m) => m("Failed to close HttpServiceListener ", exception: e)); } try { _siloHost?.StopAsync(cancelAfter).Wait(cancelAfter); _siloHost?.Dispose(); } catch (Exception e) { Log.Error((m) => m(" Silo failed to StopAsync", exception: e)); } }
static void ShutdownSilo() { if (siloHost == null) { return; } siloHost.Dispose(); GC.SuppressFinalize(siloHost); siloHost = null; }
public async Task CleanupTest() { if (_host != null) { await _host.StopAsync().ConfigureAwait(false); _host.Dispose(); _host = null; } }
public void Dispose() { _clusterClient?.Close(); _clusterClient?.Dispose(); _siloHost?.StopAsync().Wait(); _siloHost?.Dispose(); _siloScope?.Dispose(); }
public async Task StopAsync(CancellationToken cancellationToken) { if (_siloHost != null) { await _siloHost.StopAsync(cancellationToken); await _siloHost.Stopped; _siloHost.Dispose(); //_scope.Dispose(); } }
public void Dispose() { _host.Dispose(); }
public void OnStop() { siloHost?.Dispose(); }