fp/packages/temporal/src/worker.ts

18 lines
403 B
TypeScript
Raw Normal View History

2024-06-12 04:28:36 +00:00
import { Worker } from '@temporalio/worker';
import * as activities from './activities';
async function run() {
// nothing different here compared to hello world
const worker = await Worker.create({
workflowsPath: require.resolve('./workflows'),
activities,
taskQueue: 'cron-workflows',
});
await worker.run();
}
run().catch((err) => {
console.error(err);
process.exit(1);
});