fix async usage

This commit is contained in:
Andrew Herrington
2022-01-08 18:51:44 -06:00
parent bcc2242ec6
commit 2b8f217698

View File

@@ -132,7 +132,7 @@ That's what CheckTrap is for.
client = AsyncClient(ping_key="ping_key")
# works with async too, and the ping api and slugs
with CheckTrap(client, check.slug) as ct:
async with CheckTrap(client, check.slug) as ct:
# when entering the context manager, sends a start ping to your check
# Add custom logs to what gets sent to healthchecks. Reminder, only the first 10k bytes get saved
ct.add_log("My custom log message")