Skip to content

Commit

Permalink
Do not upload model files to dvas yet
Browse files Browse the repository at this point in the history
  • Loading branch information
tukiains committed Oct 19, 2023
1 parent 1874f92 commit f9248cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/data_processing/dvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def upload(self, md_api: MetadataApi, file: dict):
if not file["pid"]:
logging.error("Skipping - volatile file")
return
if file["product"]["level"] != "2" and not file["product"]["id"] == "model":
logging.error("Skipping - only L2 and model products supported")
if file["product"]["level"] != "2":
logging.error("Skipping - only L2 products supported for now")
return
try:
dvas_metadata = DvasMetadata(file)
Expand Down
4 changes: 1 addition & 3 deletions src/data_processing/subcmds/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ def main(args, storage_session: requests.Session | None = None):
}
md_api.post("files", payload)
storage_api.delete_volatile_product(s3key)
if args.dvas and (
row["product"]["level"] == "2" or row["product"]["id"] == "model"
):
if args.dvas and row["product"]["level"] == "2":
row = md_api.get(f"api/files/{row['uuid']}")
dvas.upload(md_api, row)
except (OSError, MiscError) as err:
Expand Down

0 comments on commit f9248cb

Please sign in to comment.