port-ocean 0.12.2.dev16__py3-none-any.whl → 0.12.2.dev17__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/run.py +19 -14
- {port_ocean-0.12.2.dev16.dist-info → port_ocean-0.12.2.dev17.dist-info}/METADATA +1 -1
- {port_ocean-0.12.2.dev16.dist-info → port_ocean-0.12.2.dev17.dist-info}/RECORD +6 -6
- {port_ocean-0.12.2.dev16.dist-info → port_ocean-0.12.2.dev17.dist-info}/LICENSE.md +0 -0
- {port_ocean-0.12.2.dev16.dist-info → port_ocean-0.12.2.dev17.dist-info}/WHEEL +0 -0
- {port_ocean-0.12.2.dev16.dist-info → port_ocean-0.12.2.dev17.dist-info}/entry_points.txt +0 -0
port_ocean/run.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
from inspect import getmembers
|
|
2
3
|
from typing import Dict, Any, Type
|
|
3
4
|
|
|
@@ -6,9 +7,13 @@ from pydantic import BaseModel
|
|
|
6
7
|
|
|
7
8
|
from port_ocean.bootstrap import create_default_app
|
|
8
9
|
from port_ocean.config.dynamic import default_config_factory
|
|
9
|
-
from port_ocean.config.settings import LogLevelType
|
|
10
|
+
from port_ocean.config.settings import LogLevelType, ApplicationSettings
|
|
11
|
+
from port_ocean.core.defaults import initialize_defaults
|
|
12
|
+
from port_ocean.core.utils import validate_integration_runtime
|
|
13
|
+
from port_ocean.log.logger_setup import setup_logger
|
|
10
14
|
from port_ocean.ocean import Ocean
|
|
11
15
|
from port_ocean.utils.misc import get_spec_file, load_module
|
|
16
|
+
from port_ocean.utils.signal import init_signal_handler
|
|
12
17
|
|
|
13
18
|
|
|
14
19
|
def _get_default_config_factory() -> None | Type[BaseModel]:
|
|
@@ -27,13 +32,13 @@ def run(
|
|
|
27
32
|
initialize_port_resources: bool | None = None,
|
|
28
33
|
config_override: Dict[str, Any] | None = None,
|
|
29
34
|
) -> None:
|
|
30
|
-
|
|
35
|
+
application_settings = ApplicationSettings(log_level=log_level, port=port)
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
init_signal_handler()
|
|
38
|
+
setup_logger(
|
|
39
|
+
application_settings.log_level,
|
|
40
|
+
enable_http_handler=application_settings.enable_http_logging,
|
|
41
|
+
)
|
|
37
42
|
|
|
38
43
|
config_factory = _get_default_config_factory()
|
|
39
44
|
default_app = create_default_app(path, config_factory, config_override)
|
|
@@ -45,14 +50,14 @@ def run(
|
|
|
45
50
|
)
|
|
46
51
|
|
|
47
52
|
# Validate that the current integration's runtime matches the execution parameters
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
asyncio.get_event_loop().run_until_complete(
|
|
54
|
+
validate_integration_runtime(app.port_client, app.config.runtime)
|
|
55
|
+
)
|
|
51
56
|
|
|
52
57
|
# Override config with arguments
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
if initialize_port_resources is not None:
|
|
59
|
+
app.config.initialize_port_resources = initialize_port_resources
|
|
60
|
+
|
|
61
|
+
initialize_defaults(app.integration.AppConfigHandlerClass.CONFIG_CLASS, app.config)
|
|
57
62
|
|
|
58
63
|
uvicorn.run(app, host="0.0.0.0", port=8000, loop="none")
|
|
@@ -117,7 +117,7 @@ port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2
|
|
|
117
117
|
port_ocean/middlewares.py,sha256=9wYCdyzRZGK1vjEJ28FY_DkfwDNENmXp504UKPf5NaQ,2727
|
|
118
118
|
port_ocean/ocean.py,sha256=7NV-QVP-NivyZNoJXp2Mz6NGjkR0ngqml2zfdV5Qulc,4861
|
|
119
119
|
port_ocean/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
120
|
-
port_ocean/run.py,sha256=
|
|
120
|
+
port_ocean/run.py,sha256=6FHXSLkb7Lkyf15iQH7tifo-z2Z1RolkNaNju9rWFoM,2193
|
|
121
121
|
port_ocean/sonar-project.properties,sha256=X_wLzDOkEVmpGLRMb2fg9Rb0DxWwUFSvESId8qpvrPI,73
|
|
122
122
|
port_ocean/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
123
|
port_ocean/tests/clients/port/mixins/test_entities.py,sha256=A9myrnkLhKSQrnOLv1Zz2wiOVSxW65Q9RIUIRbn_V7w,1586
|
|
@@ -140,8 +140,8 @@ port_ocean/utils/repeat.py,sha256=0EFWM9d8lLXAhZmAyczY20LAnijw6UbIECf5lpGbOas,32
|
|
|
140
140
|
port_ocean/utils/signal.py,sha256=K-6kKFQTltcmKDhtyZAcn0IMa3sUpOHGOAUdWKgx0_E,1369
|
|
141
141
|
port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
|
|
142
142
|
port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
|
|
143
|
-
port_ocean-0.12.2.
|
|
144
|
-
port_ocean-0.12.2.
|
|
145
|
-
port_ocean-0.12.2.
|
|
146
|
-
port_ocean-0.12.2.
|
|
147
|
-
port_ocean-0.12.2.
|
|
143
|
+
port_ocean-0.12.2.dev17.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
144
|
+
port_ocean-0.12.2.dev17.dist-info/METADATA,sha256=r6PD39j-z-I0Fb1a_bEg6t7cueWWA1hs8As9lACIufk,6671
|
|
145
|
+
port_ocean-0.12.2.dev17.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
146
|
+
port_ocean-0.12.2.dev17.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
|
|
147
|
+
port_ocean-0.12.2.dev17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|