mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
16 lines
446 B
TypeScript
16 lines
446 B
TypeScript
import { definePlugin } from 'nitro';
|
|
|
|
// Start the Postgres World
|
|
// Needed since we test this in CI
|
|
export default definePlugin(async () => {
|
|
if (process.env.WORKFLOW_TARGET_WORLD === '@workflow/world-postgres') {
|
|
import('workflow/runtime').then(async ({ getWorld }) => {
|
|
const world = await getWorld();
|
|
if (world.start) {
|
|
console.log('Starting World workers...');
|
|
await world.start();
|
|
}
|
|
});
|
|
}
|
|
});
|