public JsonResult DequeueItem() { string releaseJson = _redisQueue.Dequeue(); if (string.IsNullOrWhiteSpace(releaseJson)) { return(Json(string.Empty)); } ReleaseDTO release = JsonConvert.DeserializeObject <ReleaseDTO>(releaseJson); return(Json(release)); }
public void Start() { ConsoleSpinner consoleSpinner = new ConsoleSpinner(); consoleSpinner.Delay = TimeSpan.FromSeconds(1); while (true) { consoleSpinner.Turn("Aguardando release", pAnimationSequence: 1); string releaseItem = _redisQueue.Dequeue(); if (!string.IsNullOrWhiteSpace(releaseItem)) { ReleaseDTO release = JsonConvert.DeserializeObject <ReleaseDTO>(releaseItem); ExecuteReleaseRobot(release); } } }