mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-03 17:51:58 +01:00
Reviewed and verified at 5b137b5cda.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
12 lines
834 B
TypeScript
12 lines
834 B
TypeScript
import { notifyNativeHarnessBackupExpiration } from "./native-harness-backup-expiration-notifications.js";
|
|
import { notifySkillVersionRetention } from "./skill-version-retention-notifications.js";
|
|
import { DELIVERY_QUEUES, notifyDeliveryWork } from "./delivery-work-notifications.js";
|
|
|
|
export type NativeEnvironmentSettlementScope = { companyId: string; runId?: string; issueId?: string; leaseId?: string };
|
|
export async function notifyNativeEnvironmentSettlement(tx: object, scope?: NativeEnvironmentSettlementScope) {
|
|
await notifyNativeHarnessBackupExpiration(tx, scope);
|
|
if (scope) await notifySkillVersionRetention(tx, scope.companyId);
|
|
await notifyDeliveryWork(tx, DELIVERY_QUEUES.nativeEnvironmentSettlement,
|
|
scope ? JSON.stringify({ companyId: scope.companyId, runId: scope.runId, issueId: scope.issueId }) : "*");
|
|
}
|