Skip to content

Commit

Permalink
Merge pull request #28 from cherusk/repair_request_handling
Browse files Browse the repository at this point in the history
repair health check endpoint resource
  • Loading branch information
cherusk committed May 6, 2023
2 parents 6eabf59 + 57cf55a commit e043560
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 e043560

Please sign in to comment.