feat(catalog): queue furniture imports with history and matching file attachments
This commit is contained in:
@@ -20,3 +20,18 @@ export const onRequestError: Instrumentation.onRequestError = async (
|
||||
: null,
|
||||
});
|
||||
};
|
||||
|
||||
export async function register() {
|
||||
if (
|
||||
process.env.NEXT_RUNTIME !== "nodejs" ||
|
||||
process.env.NEXT_PHASE === "phase-production-build"
|
||||
)
|
||||
return;
|
||||
const { drainFurnitureImports } = await import(
|
||||
"@/lib/services/furni-job-worker"
|
||||
);
|
||||
const timer = setInterval(() => {
|
||||
void drainFurnitureImports();
|
||||
}, 30000);
|
||||
timer.unref();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user