repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add types to OCPP configuration key handling code
[e-mobility-charging-stations-simulator.git]
/
src
/
worker
/
WorkerUtils.ts
diff --git
a/src/worker/WorkerUtils.ts
b/src/worker/WorkerUtils.ts
index a181d80e205a2d6050e0f148311846d9a38db97a..3b90b6fb78cf301017ea746aa2fb47b7298b68e9 100644
(file)
--- a/
src/worker/WorkerUtils.ts
+++ b/
src/worker/WorkerUtils.ts
@@
-1,9
+1,15
@@
+import { threadId } from 'worker_threads';
+
import chalk from 'chalk';
export class WorkerUtils {
import chalk from 'chalk';
export class WorkerUtils {
+ private constructor() {
+ // This is intentional
+ }
+
public static defaultExitHandler = (code: number): void => {
if (code !== 0) {
public static defaultExitHandler = (code: number): void => {
if (code !== 0) {
- console.error(chalk.red(`Worker stopped with exit code ${code}`));
+ console.error(chalk.red(`Worker
${threadId}
stopped with exit code ${code}`));
}
};
}
}
};
}