dapr-ext-fastapi-dev 1.14.0rc1.dev18__tar.gz → 1.14.0rc1.dev19__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.
Potentially problematic release.
This version of dapr-ext-fastapi-dev might be problematic. Click here for more details.
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/PKG-INFO +1 -1
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr/ext/fastapi/actor.py +7 -8
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr_ext_fastapi_dev.egg-info/PKG-INFO +1 -1
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/LICENSE +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/README.rst +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr/ext/fastapi/__init__.py +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr/ext/fastapi/app.py +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr/ext/fastapi/version.py +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr_ext_fastapi_dev.egg-info/SOURCES.txt +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr_ext_fastapi_dev.egg-info/dependency_links.txt +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr_ext_fastapi_dev.egg-info/requires.txt +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/dapr_ext_fastapi_dev.egg-info/top_level.txt +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/setup.cfg +0 -0
- {dapr-ext-fastapi-dev-1.14.0rc1.dev18 → dapr-ext-fastapi-dev-1.14.0rc1.dev19}/setup.py +0 -0
|
@@ -15,14 +15,13 @@ limitations under the License.
|
|
|
15
15
|
|
|
16
16
|
from typing import Any, Optional, Type, List
|
|
17
17
|
|
|
18
|
+
from dapr.actor import Actor, ActorRuntime
|
|
19
|
+
from dapr.clients.exceptions import ERROR_CODE_UNKNOWN, DaprInternalError
|
|
20
|
+
from dapr.serializers import DefaultJSONSerializer
|
|
18
21
|
from fastapi import FastAPI, APIRouter, Request, Response, status # type: ignore
|
|
19
22
|
from fastapi.logger import logger
|
|
20
23
|
from fastapi.responses import JSONResponse
|
|
21
24
|
|
|
22
|
-
from dapr.actor import Actor, ActorRuntime
|
|
23
|
-
from dapr.clients.exceptions import DaprInternalError, ERROR_CODE_UNKNOWN
|
|
24
|
-
from dapr.serializers import DefaultJSONSerializer
|
|
25
|
-
|
|
26
25
|
DEFAULT_CONTENT_TYPE = 'application/json; utf-8'
|
|
27
26
|
DAPR_REENTRANCY_ID_HEADER = 'Dapr-Reentrancy-Id'
|
|
28
27
|
|
|
@@ -72,7 +71,7 @@ class DaprActor(object):
|
|
|
72
71
|
try:
|
|
73
72
|
await ActorRuntime.deactivate(actor_type_name, actor_id)
|
|
74
73
|
except DaprInternalError as ex:
|
|
75
|
-
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.
|
|
74
|
+
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
|
|
76
75
|
except Exception as ex:
|
|
77
76
|
return _wrap_response(
|
|
78
77
|
status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
|
|
@@ -96,7 +95,7 @@ class DaprActor(object):
|
|
|
96
95
|
actor_type_name, actor_id, method_name, req_body, reentrancy_id
|
|
97
96
|
)
|
|
98
97
|
except DaprInternalError as ex:
|
|
99
|
-
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.
|
|
98
|
+
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
|
|
100
99
|
except Exception as ex:
|
|
101
100
|
return _wrap_response(
|
|
102
101
|
status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
|
|
@@ -117,7 +116,7 @@ class DaprActor(object):
|
|
|
117
116
|
req_body = await request.body()
|
|
118
117
|
await ActorRuntime.fire_timer(actor_type_name, actor_id, timer_name, req_body)
|
|
119
118
|
except DaprInternalError as ex:
|
|
120
|
-
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.
|
|
119
|
+
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
|
|
121
120
|
except Exception as ex:
|
|
122
121
|
return _wrap_response(
|
|
123
122
|
status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
|
|
@@ -139,7 +138,7 @@ class DaprActor(object):
|
|
|
139
138
|
req_body = await request.body()
|
|
140
139
|
await ActorRuntime.fire_reminder(actor_type_name, actor_id, reminder_name, req_body)
|
|
141
140
|
except DaprInternalError as ex:
|
|
142
|
-
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.
|
|
141
|
+
return _wrap_response(status.HTTP_500_INTERNAL_SERVER_ERROR, ex.as_json_safe_dict())
|
|
143
142
|
except Exception as ex:
|
|
144
143
|
return _wrap_response(
|
|
145
144
|
status.HTTP_500_INTERNAL_SERVER_ERROR, repr(ex), ERROR_CODE_UNKNOWN
|
|
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
|