Skip to content

Commit

Permalink
feat: handles error on png generation
Browse files Browse the repository at this point in the history
  • Loading branch information
rubvalave authored and hotzevzl committed Apr 5, 2022
1 parent 3a27a73 commit dda441a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ import { BlmFinalResultsRepository } from './blm-final-results.repository';
import { BlmInputFiles } from './blm-input-files';
import { BlmCalibrationStarted } from './events/blm-calibration-started.event';
import { MarxanRunnerFactory } from './marxan-runner.factory';
import { Logger } from '@nestjs/common';

@Injectable()
export class MarxanSandboxBlmRunnerService
implements SandboxRunner<JobData, void> {
readonly #controllers: Record<string, AbortController> = {};
private readonly logger: Logger = new Logger('Marxan Sandbox Blm Runner');

constructor(
private readonly moduleRef: ModuleRef,
Expand Down Expand Up @@ -125,7 +127,10 @@ export class MarxanSandboxBlmRunnerService
);

if (isLeft(pngStream)) {
throw new InternalServerErrorException();
this.logger.error(
`Could not add PNG data for blm run for scenario ID: ${scenarioId} and blmValue: ${blmValue}`,
);
continue;
}

await this.finalResultsRepository.updatePngDataOnFinalResults(
Expand Down

0 comments on commit dda441a

Please sign in to comment.