diff --git a/result/tests/Dockerfile b/result/tests/Dockerfile index cb5a5eb..b8b6e90 100644 --- a/result/tests/Dockerfile +++ b/result/tests/Dockerfile @@ -1,5 +1,6 @@ FROM node:8.9-slim -RUN apt-get update -qq && apt-get install -qy \ + +RUN apt-get update -qq && apt-get install -qy \ ca-certificates \ bzip2 \ curl \ diff --git a/worker/src/Worker/Program.cs b/worker/src/Worker/Program.cs index 634b937..25191aa 100644 --- a/worker/src/Worker/Program.cs +++ b/worker/src/Worker/Program.cs @@ -28,6 +28,9 @@ namespace Worker var definition = new { vote = "", voter_id = "" }; while (true) { + // Slow down to prevent CPU spike, only query each 100ms + Thread.Sleep(100); + // Reconnect redis if down if (redisConn == null || !redisConn.IsConnected) { Console.WriteLine("Reconnecting Redis");