snowplow-archive / factotum-server

10 stars 2 forks source link

Refuse requests and pause processing when Consul server is unavailable #3

Open ungn opened 7 years ago

ungn commented 7 years ago

The key/value store in Consul is used as persistence for state of Factotum job requests. Accurate state will become important when attempting to resume a failed job on a distributed system.

At the moment, Factotum Server will continue to accept further requests and processing what it has queued if the Consul server becomes unavailable (or never started up).

Change behaviour to handle what the server does when Consul is unavailable (at the very least, stop accepting further requests, and return a 503).

ungn commented 7 years ago

Some tests also panic when Consul is unavailable - replace all test instances with mocks so they can pass without depending on it being up.