public async Task <IActionResult> IniciarOperacionAsync() { try { await _backgroundTask.StartAsync(_configuration); Log.Information(Constantes.Operacion.INICIOOPERACION); _response = Ok(Constantes.Operacion.INICIOOPERACION); } catch (Exception ex) { Log.Error(ex, Constantes.MsgLog.ERRORMETODO, nameof(IniciarOperacionAsync)); _response = StatusCode(HttpStatusCode.InternalServerError.GetHashCode(), string.Format(Constantes.Tarea.FALLOTAREA, ex.Message, ex.StackTrace)); } return(_response); }
public async Task <IActionResult> IniciarOperacionAsync() { try { Log.Information("Se incovó el método: " + nameof(IniciarOperacionAsync)); await _backgroundTask.StartAsync(_configuration); _response = Ok(System.Reflection.MethodInfo.GetCurrentMethod().Name); } catch (Exception ex) { _response = StatusCode(HttpStatusCode.InternalServerError.GetHashCode(), ex.Message); } return(_response); }