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
Merge branch 'main' of github.com:SAP/e-mobility-charging-stations-simulator
[e-mobility-charging-stations-simulator.git]
/
src
/
performance
/
storage
/
MikroOrmStorage.ts
diff --git
a/src/performance/storage/MikroOrmStorage.ts
b/src/performance/storage/MikroOrmStorage.ts
index 3c4e7fd3cb036140753f010959e1c0fc131db234..d1b84b8577d6bd267cf709cbc4cfd0880ceaea88 100644
(file)
--- a/
src/performance/storage/MikroOrmStorage.ts
+++ b/
src/performance/storage/MikroOrmStorage.ts
@@
-21,7
+21,7
@@
import { Constants } from '../../utils';
export class MikroOrmStorage extends Storage {
private storageType: StorageType;
export class MikroOrmStorage extends Storage {
private storageType: StorageType;
- private orm
!: MikroORM | null
;
+ private orm
?: MikroORM
;
constructor(storageUri: string, logPrefix: string, storageType: StorageType) {
super(storageUri, logPrefix);
constructor(storageUri: string, logPrefix: string, storageType: StorageType) {
super(storageUri, logPrefix);
@@
-53,7
+53,7
@@
export class MikroOrmStorage extends Storage {
try {
if (this?.orm) {
await this.orm.close();
try {
if (this?.orm) {
await this.orm.close();
-
this.orm = null
;
+
delete this?.orm
;
}
} catch (error) {
this.handleDBError(this.storageType, error as Error);
}
} catch (error) {
this.handleDBError(this.storageType, error as Error);