Load Vault before worker workflows
All checks were successful
Build and deploy Worker / build (push) Successful in 1m0s
All checks were successful
Build and deploy Worker / build (push) Successful in 1m0s
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
|
|
||||||
import { config } from '../config.js';
|
import { config } from '../config.js';
|
||||||
import { processVoiceExperienceWorkflow } from './workflows/process-voice-experience.js';
|
|
||||||
|
|
||||||
function resolveWorkerSlots(): number {
|
function resolveWorkerSlots(): number {
|
||||||
if (!Number.isFinite(config.workerSlots) || config.workerSlots <= 0) return 4;
|
if (!Number.isFinite(config.workerSlots) || config.workerSlots <= 0) return 4;
|
||||||
@@ -14,6 +13,9 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { hatchet } = await import('./hatchet-client.js');
|
const { hatchet } = await import('./hatchet-client.js');
|
||||||
|
const { processVoiceExperienceWorkflow } = await import(
|
||||||
|
'./workflows/process-voice-experience.js'
|
||||||
|
);
|
||||||
const worker = await hatchet.worker(config.workerName, {
|
const worker = await hatchet.worker(config.workerName, {
|
||||||
workflows: [processVoiceExperienceWorkflow],
|
workflows: [processVoiceExperienceWorkflow],
|
||||||
slots: resolveWorkerSlots(),
|
slots: resolveWorkerSlots(),
|
||||||
|
|||||||
Reference in New Issue
Block a user