You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
682 B
23 lines
682 B
import type { ParkedSessionJobData } from "@/modules/address/parked-session-queue-types";
|
|
import {
|
|
preheatParkedQuoteSession,
|
|
releaseParkedQuoteSession,
|
|
} from "@/workers/rpa/parked-quote-session";
|
|
import { withRpaSessionLock } from "@/workers/rpa/session-manager";
|
|
|
|
export async function processParkedSessionPreheatJob(
|
|
data: ParkedSessionJobData,
|
|
): Promise<void> {
|
|
await withRpaSessionLock(async () => {
|
|
await preheatParkedQuoteSession(data.sessionId);
|
|
});
|
|
}
|
|
|
|
export async function processReleaseParkedSessionJob(
|
|
data: ParkedSessionJobData,
|
|
): Promise<void> {
|
|
await withRpaSessionLock(async () => {
|
|
await releaseParkedQuoteSession(data.sessionId);
|
|
});
|
|
}
|