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.

22 lines
624 B

import { addParkedSessionJob } from "@/workers/rpa/queue";
/** 用户打开确认弹窗时异步预热驻留 RPA 页 */
export async function requestParkedSessionPreheat(
sessionId: string,
): Promise<void> {
if (process.env.RPA_QUEUE_ENABLED === "false") {
return;
}
await addParkedSessionJob("parked-session-preheat", sessionId);
}
/** 用户取消地址确认时释放驻留页 */
export async function requestReleaseParkedSession(
sessionId: string,
): Promise<void> {
if (process.env.RPA_QUEUE_ENABLED === "false") {
return;
}
await addParkedSessionJob("release-parked-session", sessionId);
}