streamlit-octostar-utils 0.5.0.dev14__tar.gz → 0.5.0.dev16__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.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/PKG-INFO +1 -1
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/pyproject.toml +1 -1
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/celery.py +9 -1
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/nifi.py +1 -1
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/LICENSE +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/README.md +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/contents.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/core/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/core/dict.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/core/filetypes.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/core/timestamp.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/nlp/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/nlp/language.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/nlp/ner.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/octostar/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/octostar/client.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/octostar/context.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/octostar/permissions.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/ontology/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/ontology/relationships.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/ontology/validation.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/style/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/style/common.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/threading/__init__.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
- {streamlit_octostar_utils-0.5.0.dev14 → streamlit_octostar_utils-0.5.0.dev16}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
|
@@ -258,7 +258,7 @@ class CeleryExecutor(object):
|
|
|
258
258
|
self._last_stall_check = 0
|
|
259
259
|
self._stall_check_interval = 60
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
self._is_owner = False
|
|
262
262
|
self.set_cleanup_task()
|
|
263
263
|
self.register_state_signals()
|
|
264
264
|
|
|
@@ -323,6 +323,9 @@ class CeleryExecutor(object):
|
|
|
323
323
|
|
|
324
324
|
def cleanup_task_results(in_dir, out_dir, redis_host, redis_port, task_expires, result_expires):
|
|
325
325
|
logger.info("Starting cleanup of expired task results...")
|
|
326
|
+
if not os.path.isdir(in_dir) or not os.path.isdir(out_dir):
|
|
327
|
+
logger.warning(f"Data directories missing (in={os.path.isdir(in_dir)}, out={os.path.isdir(out_dir)}), skipping cleanup")
|
|
328
|
+
return
|
|
326
329
|
redis_client = redis.StrictRedis(host=redis_host, port=redis_port)
|
|
327
330
|
for file_name in os.listdir(in_dir):
|
|
328
331
|
file_path = os.path.join(in_dir, file_name)
|
|
@@ -392,6 +395,8 @@ class CeleryExecutor(object):
|
|
|
392
395
|
}
|
|
393
396
|
|
|
394
397
|
def start(self):
|
|
398
|
+
self._is_owner = True
|
|
399
|
+
atexit.register(self.close)
|
|
395
400
|
logger.info("Initializing data folders...")
|
|
396
401
|
shutil.rmtree(self.root_folder, ignore_errors=True)
|
|
397
402
|
for folder in [self.in_folder, self.out_folder]:
|
|
@@ -591,6 +596,9 @@ class CeleryExecutor(object):
|
|
|
591
596
|
logger.error(f"Error checking stall for queue '{queue_name}': {e}")
|
|
592
597
|
|
|
593
598
|
def close(self):
|
|
599
|
+
if not self._is_owner:
|
|
600
|
+
return
|
|
601
|
+
self._is_owner = False
|
|
594
602
|
self.stop_event.set()
|
|
595
603
|
if self.worker_health_check_thread and self.worker_health_check_thread.is_alive():
|
|
596
604
|
self.worker_health_check_thread.join(timeout=2)
|
|
@@ -671,7 +671,7 @@ class NifiContextManager(object):
|
|
|
671
671
|
try:
|
|
672
672
|
yield True
|
|
673
673
|
finally:
|
|
674
|
-
short_expiry =
|
|
674
|
+
short_expiry = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
675
675
|
statuses = [
|
|
676
676
|
{
|
|
677
677
|
"entity_id": rec["os_entity_uid"],
|
|
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
|