jararaca 0.4.0a5__py3-none-any.whl → 0.4.0a19__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.
- jararaca/__init__.py +9 -9
- jararaca/cli.py +643 -4
- jararaca/core/providers.py +4 -0
- jararaca/helpers/__init__.py +3 -0
- jararaca/helpers/global_scheduler/__init__.py +3 -0
- jararaca/helpers/global_scheduler/config.py +21 -0
- jararaca/helpers/global_scheduler/controller.py +42 -0
- jararaca/helpers/global_scheduler/registry.py +32 -0
- jararaca/messagebus/decorators.py +104 -10
- jararaca/messagebus/interceptors/aiopika_publisher_interceptor.py +50 -8
- jararaca/messagebus/interceptors/message_publisher_collector.py +62 -0
- jararaca/messagebus/interceptors/publisher_interceptor.py +25 -3
- jararaca/messagebus/worker.py +276 -200
- jararaca/microservice.py +3 -1
- jararaca/observability/providers/otel.py +31 -13
- jararaca/persistence/base.py +1 -1
- jararaca/persistence/utilities.py +47 -24
- jararaca/presentation/decorators.py +3 -3
- jararaca/reflect/decorators.py +24 -10
- jararaca/reflect/helpers.py +18 -0
- jararaca/rpc/http/__init__.py +2 -2
- jararaca/rpc/http/decorators.py +9 -9
- jararaca/scheduler/beat_worker.py +14 -14
- jararaca/tools/typescript/decorators.py +4 -4
- jararaca/tools/typescript/interface_parser.py +3 -1
- jararaca/utils/env_parse_utils.py +133 -0
- jararaca/utils/rabbitmq_utils.py +47 -0
- jararaca/utils/retry.py +11 -13
- {jararaca-0.4.0a5.dist-info → jararaca-0.4.0a19.dist-info}/METADATA +2 -1
- {jararaca-0.4.0a5.dist-info → jararaca-0.4.0a19.dist-info}/RECORD +35 -27
- pyproject.toml +2 -1
- {jararaca-0.4.0a5.dist-info → jararaca-0.4.0a19.dist-info}/LICENSE +0 -0
- {jararaca-0.4.0a5.dist-info → jararaca-0.4.0a19.dist-info}/LICENSES/GPL-3.0-or-later.txt +0 -0
- {jararaca-0.4.0a5.dist-info → jararaca-0.4.0a19.dist-info}/WHEEL +0 -0
- {jararaca-0.4.0a5.dist-info → jararaca-0.4.0a19.dist-info}/entry_points.txt +0 -0
jararaca/__init__.py
CHANGED
|
@@ -108,13 +108,14 @@ if TYPE_CHECKING:
|
|
|
108
108
|
ResponseMiddleware,
|
|
109
109
|
RestClient,
|
|
110
110
|
Retry,
|
|
111
|
-
RetryConfig,
|
|
112
111
|
RouteHttpErrorHandler,
|
|
113
112
|
RPCRequestNetworkError,
|
|
113
|
+
RPCRetryPolicy,
|
|
114
114
|
RPCUnhandleError,
|
|
115
115
|
Timeout,
|
|
116
116
|
TimeoutException,
|
|
117
117
|
)
|
|
118
|
+
from jararaca.utils.retry import RetryPolicy
|
|
118
119
|
|
|
119
120
|
from .core.providers import ProviderSpec, Token
|
|
120
121
|
from .di import Container
|
|
@@ -132,6 +133,7 @@ if TYPE_CHECKING:
|
|
|
132
133
|
Microservice,
|
|
133
134
|
is_shutting_down,
|
|
134
135
|
request_shutdown,
|
|
136
|
+
shutdown_race,
|
|
135
137
|
use_app_context,
|
|
136
138
|
use_app_transaction_context,
|
|
137
139
|
use_app_tx_ctx_data,
|
|
@@ -210,6 +212,7 @@ if TYPE_CHECKING:
|
|
|
210
212
|
"get_all_metadata",
|
|
211
213
|
"get_metadata_value",
|
|
212
214
|
"RedisMessageBrokerBackend",
|
|
215
|
+
"RetryPolicy",
|
|
213
216
|
"FilterRuleApplier",
|
|
214
217
|
"SortRuleApplier",
|
|
215
218
|
"use_bus_message_controller",
|
|
@@ -270,6 +273,7 @@ if TYPE_CHECKING:
|
|
|
270
273
|
"use_app_transaction_context",
|
|
271
274
|
"use_app_tx_ctx_data",
|
|
272
275
|
"is_shutting_down",
|
|
276
|
+
"shutdown_race",
|
|
273
277
|
"request_shutdown",
|
|
274
278
|
"Microservice",
|
|
275
279
|
"T_BASEMODEL",
|
|
@@ -304,7 +308,6 @@ if TYPE_CHECKING:
|
|
|
304
308
|
"use_session",
|
|
305
309
|
"use_transaction",
|
|
306
310
|
"providing_session",
|
|
307
|
-
"provide_session",
|
|
308
311
|
"uses_persistence_session",
|
|
309
312
|
"skip_persistence_session",
|
|
310
313
|
"set_use_persistence_session",
|
|
@@ -353,7 +356,7 @@ if TYPE_CHECKING:
|
|
|
353
356
|
"RequestHook",
|
|
354
357
|
"ResponseHook",
|
|
355
358
|
# Configuration classes
|
|
356
|
-
"
|
|
359
|
+
"RPCRetryPolicy",
|
|
357
360
|
# Exception classes
|
|
358
361
|
"TimeoutException",
|
|
359
362
|
"AppTransactionContext",
|
|
@@ -375,6 +378,7 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
375
378
|
"get_metadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
376
379
|
"get_all_metadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
377
380
|
"get_metadata_value": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
381
|
+
"RetryPolicy": (__SPEC_PARENT__, "utils.retry", None),
|
|
378
382
|
"RedisMessageBrokerBackend": (
|
|
379
383
|
__SPEC_PARENT__,
|
|
380
384
|
"broker_backend.redis_broker_backend",
|
|
@@ -519,11 +523,6 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
519
523
|
"persistence.interceptors.aiosqa_interceptor",
|
|
520
524
|
None,
|
|
521
525
|
),
|
|
522
|
-
"provide_session": (
|
|
523
|
-
__SPEC_PARENT__,
|
|
524
|
-
"persistence.interceptors.aiosqa_interceptor",
|
|
525
|
-
None,
|
|
526
|
-
),
|
|
527
526
|
"providing_new_session": (
|
|
528
527
|
__SPEC_PARENT__,
|
|
529
528
|
"persistence.interceptors.aiosqa_interceptor",
|
|
@@ -607,12 +606,13 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
607
606
|
"ResponseMiddleware": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
608
607
|
"RequestHook": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
609
608
|
"ResponseHook": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
610
|
-
"
|
|
609
|
+
"RPCRetryPolicy": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
611
610
|
"TimeoutException": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
612
611
|
"use_app_context": (__SPEC_PARENT__, "microservice", None),
|
|
613
612
|
"use_app_transaction_context": (__SPEC_PARENT__, "microservice", None),
|
|
614
613
|
"use_app_tx_ctx_data": (__SPEC_PARENT__, "microservice", None),
|
|
615
614
|
"is_shutting_down": (__SPEC_PARENT__, "microservice", None),
|
|
615
|
+
"shutdown_race": (__SPEC_PARENT__, "microservice", None),
|
|
616
616
|
"request_shutdown": (__SPEC_PARENT__, "microservice", None),
|
|
617
617
|
"AppContext": (__SPEC_PARENT__, "microservice", None),
|
|
618
618
|
"AppInterceptor": (__SPEC_PARENT__, "microservice", None),
|