We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33d9426 commit 0dd4089Copy full SHA for 0dd4089
dcor_shared/data.py
@@ -59,14 +59,21 @@ def wait_for_resource(resource_id: str,
59
time.sleep(5)
60
continue
61
62
+ # object exists in database?
63
s3_ok = res_dict.get("s3_available", None)
64
if s3_ok:
65
# If the resource is on S3, it is considered to be available.
66
break
- elif s3cc.artifact_exists(res_dict["id"]):
67
- # It is on S3, but not yet registered. That's fine.
+
68
+ # object exists on S3?
69
+ try:
70
+ s3_exist = s3cc.artifact_exists(res_dict["id"])
71
+ except BaseException:
72
+ s3_exist = False
73
+ if s3_exist:
74
- elif time.time() - t0 > timeout:
75
76
+ if time.time() - t0 > timeout:
77
raise OSError("Data import seems to take too long "
78
"for '{}'!".format(path))
79
elif not path.exists():
0 commit comments