Exemplo n.º 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));
            }
        }
Exemplo n.º 2
0
        public async Task StartAsync(CancellationToken cancellationToken)
        {
            try
            {
                _logger.LogInformation("Initializing Persistance Services...");
                await bitClientProcessor.StartServiceAync();

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