feat(notifications) : notify guide publications and admin hearts; simplify Stygian navigation
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
} from "@/lib/outbox/processor";
|
||||
import { closeRedisClient, getRedisClient } from "@/lib/redis/client";
|
||||
import { removeExpiredUnpaidCheckouts } from "@/lib/commission/cleanup";
|
||||
import { sendGuidePublicationNotifications } from "@/lib/guides/notifications";
|
||||
|
||||
let stopping = false;
|
||||
const stop = () => {
|
||||
@@ -58,7 +59,11 @@ async function run(): Promise<void> {
|
||||
await Promise.all(
|
||||
events.map(async (event) => {
|
||||
try {
|
||||
await processOutboxEvent(event, transport);
|
||||
if (event.eventType === "guide.published") {
|
||||
await sendGuidePublicationNotifications(event);
|
||||
} else {
|
||||
await processOutboxEvent(event, transport);
|
||||
}
|
||||
await markOutboxProcessed(event.id);
|
||||
} catch (cause) {
|
||||
await releaseOutboxEvent(event.id, event.attempts, cause);
|
||||
|
||||
Reference in New Issue
Block a user