Beispiel #1
0
        public async Task <ActionResult> OnGetAsync(string start = null, string stop = null)
        {
            try
            {
                //Stop Services
                if (!string.IsNullOrWhiteSpace(stop))
                {
                    await _bitClientProcessor.StopServiceAsync();
                }
                //Start Services
                if (!string.IsNullOrWhiteSpace(start))
                {
                    await _bitClientProcessor.StartServiceAync();
                }

                this._queueStatus = this._bitClientProcessor.GetCurrentStatus();
                if (!string.IsNullOrWhiteSpace(stop) || !string.IsNullOrWhiteSpace(start))
                {
                    return(RedirectToAction(string.Empty));
                }

                return(Page());
            }
            catch (Exception ex)
            {
                return(RedirectToAction(string.Empty));
            }
        }
Beispiel #2
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            try
            {
                _logger.LogInformation("Stopping Persistance Services...");
                await bitClientProcessor.StopServiceAsync();

                _logger.LogInformation("All Persistance Services Stopped....");
            }
            catch (Exception ex)
            {
                this._logger.LogError(ex.Message);
            }
        }