Skip to content

Commit

Permalink
repair health check endpoint resource
Browse files Browse the repository at this point in the history
  • Loading branch information
cherusk committed May 6, 2023
1 parent 6eabf59 commit 57cf55a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions prometheus_ss_exporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ def collect(self):


class health_check(Resource):
isLeaf = True

def render_GET(self, request):
return "200 OK"
return "200 OK".encode("utf-8")


def setup_args():
Expand Down Expand Up @@ -111,7 +110,7 @@ def main():

root = Resource()
root.putChild(b'metrics', MetricsResource(registry=REGISTRY))
root.putChild(b'health', health_check)
root.putChild(b'health', health_check())

factory = Site(root)
reactor.listenTCP(port, factory)
Expand Down

0 comments on commit 57cf55a

Please sign in to comment.