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

cove_bods/process.py: Fix ConvertJSONIntoSpreadsheets error handling #103

Merged
merged 5 commits into from
Aug 8, 2023

Conversation

radix0000
Copy link
Collaborator

Create temporary file if flattentool fails and use to propagate error to user

#100

Ed (ODSC) added 2 commits August 2, 2023 11:17
Create temporary file if flattentool fails and use to propagate error to user

#100
@radix0000 radix0000 temporarily deployed to cove-bods-dev August 2, 2023 10:32 — with GitHub Actions Inactive
@odscjames
Copy link
Collaborator

One change - currently the path is being made with

 filename = f"{name}-{id}-error.json"

It should really be made inside the directory with the other files for this bit of supplied data - see how paths are made like:

os.path.join(self.supplied_data.storage_dir(), "the-filename"),

(self here is the process task class)

This is because when we expire data, we delete all the actual data and results from the file system (we just keep some meta-data in the database so we can track usage). We do this by just deleting that directory and all it's contents, so all files should be inside the directory so they get deleted too. https://github.com/OpenDataServices/lib-cove-web-2/blob/main/libcoveweb2/management/commands/expire_files.py

@radix0000 radix0000 temporarily deployed to cove-bods-dev August 4, 2023 09:06 — with GitHub Actions Inactive
@radix0000
Copy link
Collaborator Author

Have moved creation of temporary file into self.supplied_data.storage_dir()

@radix0000 radix0000 temporarily deployed to cove-bods-dev August 4, 2023 12:53 — with GitHub Actions Inactive
@radix0000 radix0000 temporarily deployed to cove-bods-dev August 4, 2023 12:59 — with GitHub Actions Inactive
@radix0000 radix0000 merged commit 8b595eb into master Aug 8, 2023
6 checks passed
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.

2 participants