Skip to content

Commit

Permalink
Merge 825a3b4 into 40c4cd3
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo authored May 2, 2024
2 parents 40c4cd3 + 825a3b4 commit 8f434fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions script/process_image
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ fi

if (( !$development && !$errors && $transferred_any )); then
log_mysql "UPDATE images SET transferred=TRUE WHERE id=$id"
log_mysql "UPDATE observations, observation_images SET observations.updated_at = NOW() WHERE observation_images.image_id = $id AND observation_images.observation_id = observations.id"
fi

if (( !$development && $errors )); then
Expand Down
3 changes: 2 additions & 1 deletion script/retransfer_images
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ for id in $ids; do
done
done

run_mysql "UPDATE images SET transferred=TRUE WHERE id=$id" || \
run_mysql "UPDATE images SET transferred=TRUE WHERE id=$id" &&
run_mysql "UPDATE observations, observation_images SET observations.updated_at = NOW() WHERE observation_images.image_id = $id AND observation_images.observation_id = observations.id" || \
die "Failed to set transferred bit on $id."
done

Expand Down

0 comments on commit 8f434fd

Please sign in to comment.