chore: Add sleep before Slack notification

This commit is contained in:
Tom Moor
2024-03-08 22:02:20 -05:00
parent 8f996ca2f3
commit 1a454d6dbb
3 changed files with 6 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import {
Event,
} from "@server/types";
import fetch from "@server/utils/fetch";
import { sleep } from "@server/utils/timers";
import env from "../env";
import presentMessageAttachment from "../presenters/messageAttachment";
@@ -25,6 +26,8 @@ export default class SlackProcessor extends BaseProcessor {
switch (event.name) {
case "documents.publish":
case "revisions.create":
// wait a few seconds to give the document summary chance to be generated
await sleep(5000);
return this.documentUpdated(event);
case "integrations.create":