Skip to content

Commit

Permalink
Fix worker behavior for ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Oct 8, 2024
1 parent ee8ff9f commit 6e41778
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/server/src/run-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import "./sentry";
import * as Sentry from "@sentry/node";
import { runWorker } from "./worker/client";

if (typeof require !== "undefined" && require.main === module) {
runWorker().catch((e) => {
Sentry.captureException(e);
console.error("Worker crashed", e);
});
}
runWorker().catch((e) => {
Sentry.captureException(e);
console.error("Worker crashed", e);
});

0 comments on commit 6e41778

Please sign in to comment.