mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Remember to await webhook stat submission
This commit is contained in:
parent
e5612a7b41
commit
034f7816e4
1 changed files with 3 additions and 3 deletions
|
|
@ -171,7 +171,7 @@ class Proxy:
|
|||
message = await resp.json()
|
||||
|
||||
# Report webhook stats to Influx
|
||||
stats.report_webhook(time.perf_counter() - time_before, True)
|
||||
await stats.report_webhook(time.perf_counter() - time_before, True)
|
||||
|
||||
await db.add_message(conn, message["id"], message["channel_id"], member.id, original_message.author.id,
|
||||
text or "")
|
||||
|
|
@ -211,7 +211,7 @@ class Proxy:
|
|||
message_id=message["id"])
|
||||
elif resp.status == 404 and not has_already_retried:
|
||||
# Report webhook stats to Influx
|
||||
stats.report_webhook(time.perf_counter() - time_before, False)
|
||||
await stats.report_webhook(time.perf_counter() - time_before, False)
|
||||
|
||||
# Webhook doesn't exist. Delete it from the DB, create, and add a new one
|
||||
self.logger.warning("Webhook registered in DB doesn't exist, deleting hook from DB, re-adding, and trying again (channel={}, hook={})".format(original_message.channel.id, hook_id))
|
||||
|
|
@ -222,7 +222,7 @@ class Proxy:
|
|||
return await self.do_proxy_message(conn, member, original_message, text, attachment_url, has_already_retried=True)
|
||||
else:
|
||||
# Report webhook stats to Influx
|
||||
stats.report_webhook(time.perf_counter() - time_before, False)
|
||||
await stats.report_webhook(time.perf_counter() - time_before, False)
|
||||
|
||||
raise discord.HTTPException(resp, await resp.text())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue