cognite-extractor-utils 6.2.0__py3-none-any.whl → 6.2.1__py3-none-any.whl
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.
Potentially problematic release.
This version of cognite-extractor-utils might be problematic. Click here for more details.
- cognite/extractorutils/__init__.py +1 -1
- cognite/extractorutils/uploader/files.py +6 -6
- {cognite_extractor_utils-6.2.0.dist-info → cognite_extractor_utils-6.2.1.dist-info}/METADATA +1 -1
- {cognite_extractor_utils-6.2.0.dist-info → cognite_extractor_utils-6.2.1.dist-info}/RECORD +6 -6
- {cognite_extractor_utils-6.2.0.dist-info → cognite_extractor_utils-6.2.1.dist-info}/LICENSE +0 -0
- {cognite_extractor_utils-6.2.0.dist-info → cognite_extractor_utils-6.2.1.dist-info}/WHEEL +0 -0
|
@@ -17,12 +17,12 @@ from concurrent.futures import Future, ThreadPoolExecutor
|
|
|
17
17
|
from io import BytesIO
|
|
18
18
|
from os import PathLike
|
|
19
19
|
from types import TracebackType
|
|
20
|
-
from typing import
|
|
20
|
+
from typing import BinaryIO, Callable, List, Optional, Tuple, Type, Union
|
|
21
21
|
|
|
22
22
|
from requests import ConnectionError
|
|
23
23
|
|
|
24
24
|
from cognite.client import CogniteClient
|
|
25
|
-
from cognite.client.data_classes import
|
|
25
|
+
from cognite.client.data_classes import FileMetadata
|
|
26
26
|
from cognite.client.exceptions import CogniteAPIError
|
|
27
27
|
from cognite.extractorutils.uploader._base import (
|
|
28
28
|
RETRIES,
|
|
@@ -64,7 +64,7 @@ class IOFileUploadQueue(AbstractUploadQueue):
|
|
|
64
64
|
def __init__(
|
|
65
65
|
self,
|
|
66
66
|
cdf_client: CogniteClient,
|
|
67
|
-
post_upload_function: Optional[Callable[[List[
|
|
67
|
+
post_upload_function: Optional[Callable[[List[FileMetadata]], None]] = None,
|
|
68
68
|
max_queue_size: Optional[int] = None,
|
|
69
69
|
max_upload_interval: Optional[int] = None,
|
|
70
70
|
trigger_log_level: str = "DEBUG",
|
|
@@ -128,7 +128,7 @@ class IOFileUploadQueue(AbstractUploadQueue):
|
|
|
128
128
|
self.files_written.inc(self.upload_queue_size)
|
|
129
129
|
|
|
130
130
|
try:
|
|
131
|
-
self._post_upload(self.upload_queue)
|
|
131
|
+
self._post_upload([el[0] for el in self.upload_queue])
|
|
132
132
|
except Exception as e:
|
|
133
133
|
self.logger.error("Error in upload callback: %s", str(e))
|
|
134
134
|
self.upload_queue.clear()
|
|
@@ -228,7 +228,7 @@ class FileUploadQueue(IOFileUploadQueue):
|
|
|
228
228
|
def __init__(
|
|
229
229
|
self,
|
|
230
230
|
cdf_client: CogniteClient,
|
|
231
|
-
post_upload_function: Optional[Callable[[List[
|
|
231
|
+
post_upload_function: Optional[Callable[[List[FileMetadata]], None]] = None,
|
|
232
232
|
max_queue_size: Optional[int] = None,
|
|
233
233
|
max_upload_interval: Optional[int] = None,
|
|
234
234
|
trigger_log_level: str = "DEBUG",
|
|
@@ -284,7 +284,7 @@ class BytesUploadQueue(IOFileUploadQueue):
|
|
|
284
284
|
def __init__(
|
|
285
285
|
self,
|
|
286
286
|
cdf_client: CogniteClient,
|
|
287
|
-
post_upload_function: Optional[Callable[[List[
|
|
287
|
+
post_upload_function: Optional[Callable[[List[FileMetadata]], None]] = None,
|
|
288
288
|
max_queue_size: Optional[int] = None,
|
|
289
289
|
max_upload_interval: Optional[int] = None,
|
|
290
290
|
trigger_log_level: str = "DEBUG",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cognite/extractorutils/__init__.py,sha256=
|
|
1
|
+
cognite/extractorutils/__init__.py,sha256=x-wPtqhxoUAlGmkP73DLkPGwjmdssPlYGwe1TKhDAfI,739
|
|
2
2
|
cognite/extractorutils/_inner_util.py,sha256=jCPLg-FfTpyLAHkhoKaKObNwbqm19d2Z11to_DYk5EU,1558
|
|
3
3
|
cognite/extractorutils/base.py,sha256=8kzePjVlCIQVftDQ1t_4join9qhs-VOlB6eTpeX9zGk,16018
|
|
4
4
|
cognite/extractorutils/configtools/__init__.py,sha256=fj9kH8DdisNi9mI8cKm2sz50vnzeOkJQErIGB3mTYRo,2861
|
|
@@ -15,13 +15,13 @@ cognite/extractorutils/uploader/_base.py,sha256=ed9F-qFmlIylTg8UtuxfykYUfEsG_R0P
|
|
|
15
15
|
cognite/extractorutils/uploader/_metrics.py,sha256=J2LJXb19L_SLSJ_voNIQHYLp0pjxUKevpH1q_xKX6Hk,3247
|
|
16
16
|
cognite/extractorutils/uploader/assets.py,sha256=Gqu1VJqfFcIQphsfqciDFghL_zlNhBmHU8hPfaKSyFw,5441
|
|
17
17
|
cognite/extractorutils/uploader/events.py,sha256=dzqdDHRKsSUiBWqpcwJX9BpTiUGLb6abneqk1k_QmLA,5502
|
|
18
|
-
cognite/extractorutils/uploader/files.py,sha256=
|
|
18
|
+
cognite/extractorutils/uploader/files.py,sha256=u1tJDT8cCD9W9EegQWqOYevsj3BfOdFfyiO3DSWHjsc,11784
|
|
19
19
|
cognite/extractorutils/uploader/raw.py,sha256=9kvHtJoZVLD-V9xcnNEkucwvaa8DPMqsXjvCWMGiw_g,6732
|
|
20
20
|
cognite/extractorutils/uploader/time_series.py,sha256=ZPkz9NVCmz2vE7SkRm0-LjYi-ZKCRZ_Qe-YR1EVtGms,26315
|
|
21
21
|
cognite/extractorutils/uploader_extractor.py,sha256=K8cH8CIDiFNB0fXNdUymE_MKh1GYfqxHHcRoH07CFew,7673
|
|
22
22
|
cognite/extractorutils/uploader_types.py,sha256=5MKT14DUnTFVD5Nx4Zvnfp2SfaICuTKLWAFAYaZishk,1045
|
|
23
23
|
cognite/extractorutils/util.py,sha256=GDDpsoOQpgoTHUWVAUjWxGdulgOQovlD8yBWp_kObp8,14234
|
|
24
|
-
cognite_extractor_utils-6.2.
|
|
25
|
-
cognite_extractor_utils-6.2.
|
|
26
|
-
cognite_extractor_utils-6.2.
|
|
27
|
-
cognite_extractor_utils-6.2.
|
|
24
|
+
cognite_extractor_utils-6.2.1.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
25
|
+
cognite_extractor_utils-6.2.1.dist-info/METADATA,sha256=US8F0uxofliB65ELOEfC_dPUZNuP0lqdLWOD1eUpcIo,5457
|
|
26
|
+
cognite_extractor_utils-6.2.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
27
|
+
cognite_extractor_utils-6.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|