Skip to content

Commit be3539a

Browse files
committed
fix: avoid using asyncio.run so it doesn't block other parts of the code from getting the event loop
1 parent e4220e9 commit be3539a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hathor/healthcheck/resources/healthcheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def render_GET(self, request):
4343
sync_component.add_healthcheck(lambda: sync_healthcheck(self.manager))
4444

4545
healthcheck = Healthcheck(name='hathor-core', components=[sync_component])
46-
status = asyncio.run(healthcheck.run())
46+
status = asyncio.get_event_loop().run_until_complete(healthcheck.run())
4747

4848
if strict_status_code:
4949
request.setResponseCode(200)

0 commit comments

Comments
 (0)