Block build requests until environment builder is ready (#437)

* Add readiness probe
* Remove builder manager http api interface since we don’t use/need it
* Check environment builder status and block build requests until builder is ready
* Replace deprecated api extension interface
* Add healthy check to python env
This commit is contained in:
Ta-Ching Chen
2018-01-26 01:13:36 +08:00
committed by GitHub
parent b7c97cec8c
commit 0a733b20c3
18 changed files with 260 additions and 416 deletions
+3
View File
@@ -23,5 +23,8 @@ func main() {
mux := http.NewServeMux()
mux.HandleFunc("/", fetcher.FetchHandler)
mux.HandleFunc("/upload", fetcher.UploadHandler)
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
})
http.ListenAndServe(":8000", mux)
}
+4
View File
@@ -61,6 +61,10 @@ def loadv2():
return ""
@app.route('/healthz', methods=['GET'])
def healthz():
return "", 200
@app.route('/', methods=['GET', 'POST', 'PUT', 'HEAD', 'OPTIONS', 'DELETE'])
def f():
if userfunc == None: