Skip to content

Commit

Permalink
chore(parquet-exporter): reject promise if there's an already running…
Browse files Browse the repository at this point in the history
… export
  • Loading branch information
karlprieb committed Oct 3, 2024
1 parent 9237837 commit b2bb86b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/workers/parquet-exporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ export class ParquetExporter {
maxFileRows: number;
}): Promise<void> {
if (this.exportStatus.status === RUNNING) {
this.log.error('An export is already in progress');
return;
const error = new Error('An export is already in progress');
this.log.error(error.message);
return Promise.reject(error);
}

this.exportStatus.status = RUNNING;
Expand Down

0 comments on commit b2bb86b

Please sign in to comment.