dcor-shared 0.11.3__tar.gz → 0.11.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/CHANGELOG +5 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/PKG-INFO +1 -1
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/_version.py +2 -2
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/data.py +5 -12
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/PKG-INFO +1 -1
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/.github/workflows/check.yml +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/.github/workflows/deploy_pypi.yml +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/.gitignore +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/LICENSE +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/MANIFEST.in +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/README.rst +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/Vagrantfile +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/__init__.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/ckan.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/dcinst.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/mime.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/parse.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/paths.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/s3.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/s3cc.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/testing.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/SOURCES.txt +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/dependency_links.txt +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/requires.txt +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/top_level.txt +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/pyproject.toml +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/setup.cfg +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/data/calibration_beads_47.rtdc +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/requirements.txt +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_basic.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_ckan.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_data.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_s3.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_s3cc.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_testing.py +0 -0
- {dcor_shared-0.11.3 → dcor_shared-0.11.4}/vagrant-run-tests.sh +0 -0
|
@@ -2,7 +2,6 @@ import functools
|
|
|
2
2
|
import hashlib
|
|
3
3
|
import pathlib
|
|
4
4
|
import time
|
|
5
|
-
import warnings
|
|
6
5
|
|
|
7
6
|
from .ckan import get_resource_path
|
|
8
7
|
|
|
@@ -47,13 +46,7 @@ def wait_for_resource(resource_id: str,
|
|
|
47
46
|
from ckan import logic
|
|
48
47
|
|
|
49
48
|
if len(resource_id) != 36:
|
|
50
|
-
|
|
51
|
-
"instead of a string or a path. This will raise an "
|
|
52
|
-
"exception in the future.",
|
|
53
|
-
DeprecationWarning)
|
|
54
|
-
# The user passed a local path on the block storage. These look like
|
|
55
|
-
# this: /data/dcor-instance/resources/RE/SO/URCE-ID
|
|
56
|
-
resource_id = "".join(resource_id.split("/")[-3])
|
|
49
|
+
raise ValueError(f"Invalid resource id: {resource_id}")
|
|
57
50
|
|
|
58
51
|
resource_show = logic.get_action("resource_show")
|
|
59
52
|
path = pathlib.Path(get_resource_path(resource_id))
|
|
@@ -71,7 +64,7 @@ def wait_for_resource(resource_id: str,
|
|
|
71
64
|
except logic.NotFound:
|
|
72
65
|
# Other processes are still working on getting the resource
|
|
73
66
|
# online. We have to wait.
|
|
74
|
-
time.sleep(
|
|
67
|
+
time.sleep(5)
|
|
75
68
|
continue
|
|
76
69
|
|
|
77
70
|
s3_ok = res_dict.get("s3_available", None)
|
|
@@ -82,17 +75,17 @@ def wait_for_resource(resource_id: str,
|
|
|
82
75
|
# If the dataset is on S3, it is considered to be available.
|
|
83
76
|
break
|
|
84
77
|
elif not path.exists():
|
|
85
|
-
time.sleep(
|
|
78
|
+
time.sleep(5)
|
|
86
79
|
continue
|
|
87
80
|
elif dcor_depot_available and not path.is_symlink():
|
|
88
81
|
# Resource is only available when it is symlinked by
|
|
89
82
|
# the ckanext.dcor_depot `symlink_user_dataset` job
|
|
90
83
|
# (or by the ckanext.dcor_depot importers).
|
|
91
|
-
time.sleep(
|
|
84
|
+
time.sleep(5)
|
|
92
85
|
continue
|
|
93
86
|
elif path.stat().st_size == ld and path.read_bytes() == DUMMY_BYTES:
|
|
94
87
|
# wait a bit
|
|
95
|
-
time.sleep(
|
|
88
|
+
time.sleep(5)
|
|
96
89
|
continue
|
|
97
90
|
else:
|
|
98
91
|
# not a dummy file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|