Simplify job execution by removing error handling and using await for function calls in WorkersFeatureSet

This commit is contained in:
Simon Larsen 2024-09-21 15:04:57 +01:00
parent 0480e47c23
commit a49ca14fde
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA

View File

@ -122,10 +122,7 @@ const WorkersFeatureSet: FeatureSet = {
// const timeoutInMs: number = JobDictionary.getTimeoutInMs(name);
if (funcToRun) {
funcToRun().catch((err: Error) => {
logger.error("Error running job: " + name);
logger.error(err);
});
await funcToRun();
}
},
{ concurrency: 100 },