Skip to content

Commit

Permalink
Retain copy_to_prod
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 18, 2023
1 parent b95498f commit dc95221
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ingest-image/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ export default class Task {

async save_image(md) {
try {
await this.copy_to_prod(md);

const imageAttempt = (await fetcher(this.ANIML_API_URL, {
query: `
mutation CreateImageRecord($input: CreateImageInput!){
Expand Down Expand Up @@ -175,8 +173,9 @@ export default class Task {
if (msg.includes('E11000')) msg = 'DUPLICATE_IMAGE';
const err = new Error(msg);
await this.copy_to_dlb(err, md);
} else {
await this.copy_to_prod(md);
}

} catch (err) {
// backstop for unforeseen errors returned by the API
// and errors resizing/copying the image to prod buckets.
Expand Down

0 comments on commit dc95221

Please sign in to comment.