Skip to content

Commit 6c29438

Browse files
karlpriebdjwhitt
authored andcommitted
chore(parquet-exporter): reject promise if there's an already running export
1 parent 3c5be79 commit 6c29438

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/workers/parquet-exporter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ export class ParquetExporter {
9797
maxFileRows: number;
9898
}): Promise<void> {
9999
if (this.exportStatus.status === RUNNING) {
100-
this.log.error('An export is already in progress');
101-
return;
100+
const error = new Error('An export is already in progress');
101+
this.log.error(error.message);
102+
return Promise.reject(error);
102103
}
103104

104105
this.exportStatus.status = RUNNING;

0 commit comments

Comments
 (0)