tessellator / openfaas-clojure-template

An OpenFaaS template for writing functions in Clojure
MIT License
9 stars 6 forks source link

Use Jetty LifeCycle listener to create lock file for healthcheck #2

Closed tessellator closed 5 years ago

tessellator commented 5 years ago

Fixes #1

This commit suppresses of-watchdog from creating a lock file because it can create the lock file before Jetty is actually ready to receive traffic, causing the function to be labeled ready before it can successfully be invoked.

Instead, this commit adds a LifeCycle listener to the Jetty instance that will create the lock file when the Jetty server has started.