port-ocean 0.28.17__py3-none-any.whl → 0.28.18__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 port-ocean might be problematic. Click here for more details.
- port_ocean/core/integrations/mixins/utils.py +19 -16
- port_ocean/log/logger_setup.py +2 -2
- {port_ocean-0.28.17.dist-info → port_ocean-0.28.18.dist-info}/METADATA +1 -1
- {port_ocean-0.28.17.dist-info → port_ocean-0.28.18.dist-info}/RECORD +7 -7
- {port_ocean-0.28.17.dist-info → port_ocean-0.28.18.dist-info}/LICENSE.md +0 -0
- {port_ocean-0.28.17.dist-info → port_ocean-0.28.18.dist-info}/WHEEL +0 -0
- {port_ocean-0.28.17.dist-info → port_ocean-0.28.18.dist-info}/entry_points.txt +0 -0
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
from contextlib import contextmanager
|
|
2
|
-
from typing import Awaitable, Generator, Callable, cast
|
|
3
|
-
|
|
4
|
-
from loguru import logger
|
|
5
1
|
import asyncio
|
|
2
|
+
import json
|
|
6
3
|
import multiprocessing
|
|
4
|
+
import os
|
|
7
5
|
import re
|
|
8
|
-
import
|
|
6
|
+
import shutil
|
|
7
|
+
import stat
|
|
8
|
+
import subprocess
|
|
9
|
+
import tempfile
|
|
10
|
+
from contextlib import contextmanager
|
|
11
|
+
from typing import Any, AsyncGenerator, Awaitable, Callable, Generator, cast
|
|
12
|
+
|
|
13
|
+
import ijson
|
|
14
|
+
from loguru import logger
|
|
15
|
+
|
|
16
|
+
from port_ocean.clients.port.utils import _http_client as _port_http_client
|
|
17
|
+
from port_ocean.context.ocean import ocean
|
|
9
18
|
from port_ocean.core.handlers.entity_processor.jq_entity_processor import JQEntityProcessor
|
|
10
19
|
from port_ocean.core.ocean_types import (
|
|
11
20
|
ASYNC_GENERATOR_RESYNC_TYPE,
|
|
@@ -19,16 +28,8 @@ from port_ocean.exceptions.core import (
|
|
|
19
28
|
OceanAbortException,
|
|
20
29
|
KindNotImplementedException,
|
|
21
30
|
)
|
|
22
|
-
import os
|
|
23
|
-
from port_ocean.utils.async_http import _http_client
|
|
24
|
-
from port_ocean.clients.port.utils import _http_client as _port_http_client
|
|
25
31
|
from port_ocean.helpers.metric.metric import MetricType, MetricPhase
|
|
26
|
-
from port_ocean.
|
|
27
|
-
import subprocess
|
|
28
|
-
import tempfile
|
|
29
|
-
import stat
|
|
30
|
-
import ijson
|
|
31
|
-
from typing import Any, AsyncGenerator
|
|
32
|
+
from port_ocean.utils.async_http import _http_client
|
|
32
33
|
|
|
33
34
|
def _process_path_type_items(
|
|
34
35
|
result: RAW_RESULT, items_to_parse: str | None = None
|
|
@@ -216,7 +217,9 @@ async def get_items_to_parse_bulks(raw_data: dict[Any, Any], data_path: str, ite
|
|
|
216
217
|
| map({{{items_to_parse_name}: ., {base_jq_object_string}}})"""
|
|
217
218
|
|
|
218
219
|
# Use subprocess with list arguments instead of shell=True
|
|
219
|
-
|
|
220
|
+
|
|
221
|
+
jq_path = shutil.which("jq") or "/bin/jq"
|
|
222
|
+
jq_args = [jq_path, jq_expression, data_path]
|
|
220
223
|
|
|
221
224
|
with open(temp_output_path, "w") as output_file:
|
|
222
225
|
result = subprocess.run(
|
|
@@ -271,7 +274,7 @@ def get_events_as_a_stream(
|
|
|
271
274
|
max_buffer_size_mb: int = 1
|
|
272
275
|
) -> Generator[list[dict[str, Any]], None, None]:
|
|
273
276
|
events = ijson.sendable_list()
|
|
274
|
-
coro = ijson.items_coro(events, target_items)
|
|
277
|
+
coro = ijson.items_coro(events, target_items, use_float=True)
|
|
275
278
|
|
|
276
279
|
# Convert MB to bytes for the buffer size
|
|
277
280
|
buffer_size = max_buffer_size_mb * 1024 * 1024
|
port_ocean/log/logger_setup.py
CHANGED
|
@@ -61,9 +61,9 @@ def _http_loguru_handler(level: LogLevelType) -> None:
|
|
|
61
61
|
|
|
62
62
|
http_memory_handler = HTTPMemoryHandler()
|
|
63
63
|
signal_handler.register(
|
|
64
|
-
http_memory_handler.wait_for_lingering_threads, priority=-
|
|
64
|
+
http_memory_handler.wait_for_lingering_threads, priority=-900
|
|
65
65
|
)
|
|
66
|
-
signal_handler.register(http_memory_handler.flush, priority=-
|
|
66
|
+
signal_handler.register(http_memory_handler.flush, priority=-899)
|
|
67
67
|
|
|
68
68
|
queue_listener = QueueListener(queue, http_memory_handler)
|
|
69
69
|
queue_listener.start()
|
|
@@ -125,7 +125,7 @@ port_ocean/core/integrations/mixins/handler.py,sha256=mZ7-0UlG3LcrwJttFbMe-R4xcO
|
|
|
125
125
|
port_ocean/core/integrations/mixins/live_events.py,sha256=zM24dhNc7uHx9XYZ6toVhDADPA90EnpOmZxgDegFZbA,4196
|
|
126
126
|
port_ocean/core/integrations/mixins/sync.py,sha256=Vm_898pLKBwfVewtwouDWsXoxcOLicnAy6pzyqqk6U8,4053
|
|
127
127
|
port_ocean/core/integrations/mixins/sync_raw.py,sha256=TrdgwaCNbE-VEJBDRqWmLQR_1Epz6y5nEIbPaLZbe3A,41009
|
|
128
|
-
port_ocean/core/integrations/mixins/utils.py,sha256=
|
|
128
|
+
port_ocean/core/integrations/mixins/utils.py,sha256=wdpQmapYEkKDqpnyyt_KLfu6Vrcbnk2pxrW8ikqNq8Q,14652
|
|
129
129
|
port_ocean/core/models.py,sha256=DNbKpStMINI2lIekKprTqBevqkw_wFuFayN19w1aDfQ,2893
|
|
130
130
|
port_ocean/core/ocean_types.py,sha256=bkLlTd8XfJK6_JDl0eXUHfE_NygqgiInSMwJ4YJH01Q,1399
|
|
131
131
|
port_ocean/core/utils/entity_topological_sorter.py,sha256=MDUjM6OuDy4Xj68o-7InNN0w1jqjxeDfeY8U02vySNI,3081
|
|
@@ -148,7 +148,7 @@ port_ocean/helpers/retry.py,sha256=fkKL_dSNKbGLpa9qi3Ceu2yCqcnzC0OV3dcEWo_kPHA,2
|
|
|
148
148
|
port_ocean/helpers/stream.py,sha256=_UwsThzXynxWzL8OlBT1pmb2evZBi9HaaqeAGNuTuOI,2338
|
|
149
149
|
port_ocean/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
port_ocean/log/handlers.py,sha256=LJ1WAfq7wYCrBpeLPihMKmWjdSahKKXNHFMRYkbk0Co,3630
|
|
151
|
-
port_ocean/log/logger_setup.py,sha256=
|
|
151
|
+
port_ocean/log/logger_setup.py,sha256=wcr5WOkYRtng4pW6ZRl4Av3GqtZ2omSWIqYhB_8Duuc,2700
|
|
152
152
|
port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2920
|
|
153
153
|
port_ocean/middlewares.py,sha256=9wYCdyzRZGK1vjEJ28FY_DkfwDNENmXp504UKPf5NaQ,2727
|
|
154
154
|
port_ocean/ocean.py,sha256=1aurpHc47BecmnaVDVmR8LCqm5Nfa3-ltkM_xZPxu1w,9570
|
|
@@ -211,8 +211,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
|
|
|
211
211
|
port_ocean/utils/signal.py,sha256=J1sI-e_32VHP_VUa5bskLMFoJjJOAk5isrnewKDikUI,2125
|
|
212
212
|
port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
|
|
213
213
|
port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
|
|
214
|
-
port_ocean-0.28.
|
|
215
|
-
port_ocean-0.28.
|
|
216
|
-
port_ocean-0.28.
|
|
217
|
-
port_ocean-0.28.
|
|
218
|
-
port_ocean-0.28.
|
|
214
|
+
port_ocean-0.28.18.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
215
|
+
port_ocean-0.28.18.dist-info/METADATA,sha256=H7Oy4oX0MO-vhCZLHkoVpJaDZ1aSFD6fkR8tamUi6hw,7016
|
|
216
|
+
port_ocean-0.28.18.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
217
|
+
port_ocean-0.28.18.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
|
|
218
|
+
port_ocean-0.28.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|