Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for chemical analysis workflow #1336

Merged
merged 2 commits into from
Oct 13, 2023
Merged

fix for chemical analysis workflow #1336

merged 2 commits into from
Oct 13, 2023

Conversation

aarongundel
Copy link
Contributor

fixes various issues with the chemical analysis workflow/uppy implementation.

  • fixes inherent race condition that required files to be fairly large to beat the tile creation process.
  • fixes the lack of respect for django storages AWS_S3_FILE_OVERWRITE option
  • changes creation process.

On dragging a new file in to be uploaded, that file will first be created in arches and saved to s3 - as a zero byte file. Then, that updated path (if need be due to AWS_S3_FILE_OVERWRITE) will be used in uploading the file.

@aarongundel aarongundel requested a review from chiatt October 3, 2023 21:56
@aarongundel aarongundel linked an issue Oct 3, 2023 that may be closed by this pull request
Copy link
Member

@chiatt chiatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great - just found a little cruft that can be removed.

Comment on lines 134 to 135
#fields = dict(('x-amz-meta-{}'.format(key[9:len(key)-1]), value) for (key, value) in all_items if key.startswith('metadata') and key != 'metadata[type]')
#fields['content-type'] = content_type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this can be removed


@method_decorator(can_edit_resource_instance, name="dispatch")
class S3UploadView(BaseManagerView):
""""""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty docstring

@chiatt chiatt merged commit d4cf638 into dev/1.1.x Oct 13, 2023
1 check passed
@chiatt chiatt deleted the 1326-ca-workflow branch October 13, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chemical Analysis Workflow broken in disco
2 participants