mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-01 23:43:16 +01:00
* codex/sleep-run-task-recovery: fix: normalize run dispatch hints to company identity # Conflicts: # server/src/services/run-dispatch-notifications.ts
12 lines
603 B
TypeScript
12 lines
603 B
TypeScript
import { notifyIssueRecovery } from "./issue-recovery-notifications.js";
|
|
import { DELIVERY_QUEUES, notifyDeliveryWork } from "./delivery-work-notifications.js";
|
|
|
|
export type RunDispatchScope = { companyId: string };
|
|
|
|
export async function notifyRunDispatch(transaction: object, scope?: RunDispatchScope) {
|
|
await notifyIssueRecovery(transaction, scope);
|
|
const hint = scope ? JSON.stringify({ companyId: scope.companyId }) : "*";
|
|
await notifyDeliveryWork(transaction, DELIVERY_QUEUES.scheduledRetryDispatch, hint);
|
|
await notifyDeliveryWork(transaction, DELIVERY_QUEUES.queuedRunDispatch, hint);
|
|
}
|