Skip to content

Commit

Permalink
fix: use the correct path for tiff lookups when resuming jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Feb 9, 2020
1 parent 5153e6c commit 01b7223
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cog/src/cli/actions/action.batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CommandLineAction, CommandLineFlagParameter, CommandLineStringParameter
import * as aws from 'aws-sdk';
import * as ulid from 'ulid';
import { CogJob } from '../../cog';
import { getJobPath } from '../folder';
const JobQueue = 'CogBatchJobQueue';
const JobDefinition = 'CogBatchJob';

Expand Down Expand Up @@ -81,10 +82,10 @@ export class ActionBatchJob extends CommandLineAction {
let todoCount = job.quadkeys.length;
const stats = await Promise.all(
job.quadkeys.map(async quadKey => {
const targetPath = FileOperator.join(job.output.path, `${job.id}/${quadKey}.tiff`);
const targetPath = getJobPath(job, `${quadKey}.tiff`);
const exists = await outputFs.exists(targetPath);
if (exists) {
logger.info({ targetPath }, 'FileExists');
logger.debug({ targetPath }, 'FileExists');
isPartial = true;
todoCount--;
}
Expand Down

0 comments on commit 01b7223

Please sign in to comment.