streamlit-octostar-utils 0.4.2.dev16__tar.gz → 0.4.2.dev17__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.
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/PKG-INFO +1 -1
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/pyproject.toml +1 -1
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/celery.py +7 -2
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/fastapi.py +10 -1
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/LICENSE +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/README.md +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/contents.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/nifi.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/nlp/language.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/nlp/ner.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/ontology/relationships.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-0.4.2.dev16 → streamlit_octostar_utils-0.4.2.dev17}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
|
@@ -28,7 +28,7 @@ logging.getLogger("pottery").setLevel(logging.WARNING)
|
|
|
28
28
|
from celery.app.defaults import DEFAULTS as CELERY_DEFAULTS
|
|
29
29
|
import urllib
|
|
30
30
|
|
|
31
|
-
from .fastapi import Route, CommonModels, DefaultErrorRoute
|
|
31
|
+
from .fastapi import Route, CommonModels, DefaultErrorRoute, RemoteTraceback
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class RedisFileLock:
|
|
@@ -700,7 +700,12 @@ class CeleryExecutor(object):
|
|
|
700
700
|
|
|
701
701
|
async def get_task_result(self, task_id, remove=False):
|
|
702
702
|
def _try_get_task_data(celery_app, task_id):
|
|
703
|
-
celery_app.AsyncResult(task_id)
|
|
703
|
+
async_result = celery_app.AsyncResult(task_id)
|
|
704
|
+
if async_result.state in ("FAILURE", "RETRY", "REVOKED"):
|
|
705
|
+
exc = async_result.result
|
|
706
|
+
if not isinstance(exc, BaseException):
|
|
707
|
+
exc = RuntimeError(str(exc))
|
|
708
|
+
raise exc from RemoteTraceback(async_result.traceback)
|
|
704
709
|
|
|
705
710
|
def _read_task_data(out_folder, task_id):
|
|
706
711
|
serialized_data = CelerySerialized(folder=out_folder, redis_client=self.redis_client)
|
|
@@ -267,6 +267,11 @@ class ErrorLogFilter(logging.Filter):
|
|
|
267
267
|
return True
|
|
268
268
|
|
|
269
269
|
|
|
270
|
+
class RemoteTraceback(Exception):
|
|
271
|
+
"""Holds a formatted traceback string from a remote worker process."""
|
|
272
|
+
pass
|
|
273
|
+
|
|
274
|
+
|
|
270
275
|
class DefaultErrorRoute:
|
|
271
276
|
DEFAULT_STATUS_CODE_MAPPINGS = {
|
|
272
277
|
StarletteHTTPException: lambda exc: exc.status_code,
|
|
@@ -329,7 +334,11 @@ class DefaultErrorRoute:
|
|
|
329
334
|
if len(message) > MAX_ERROR_MESSAGE_BYTES:
|
|
330
335
|
message = message[-MAX_ERROR_MESSAGE_BYTES:]
|
|
331
336
|
try:
|
|
332
|
-
|
|
337
|
+
remote_cause = getattr(exc, "__cause__", None)
|
|
338
|
+
if isinstance(remote_cause, RemoteTraceback):
|
|
339
|
+
tcbk = str(remote_cause)
|
|
340
|
+
else:
|
|
341
|
+
tcbk = "\n".join(traceback.format_exception(exc))
|
|
333
342
|
if len(tcbk) > MAX_ERROR_TRACEBACK_BYTES:
|
|
334
343
|
tcbk = tcbk[-MAX_ERROR_TRACEBACK_BYTES:]
|
|
335
344
|
except:
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|