moose-lib 0.5.21__tar.gz → 0.5.22__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 moose-lib might be problematic. Click here for more details.
- {moose_lib-0.5.21 → moose_lib-0.5.22}/PKG-INFO +1 -1
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/main.py +19 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib.egg-info/PKG-INFO +1 -1
- {moose_lib-0.5.21 → moose_lib-0.5.22}/README.md +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/__init__.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/blocks.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/clients/__init__.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/clients/redis_client.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/commons.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/config/__init__.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/config/config_file.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/config/runtime.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/data_models.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/__init__.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/_registry.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/consumption.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/ingest_api.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/ingest_pipeline.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/life_cycle.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/materialized_view.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/olap_table.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/registry.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/sql_resource.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/stream.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/types.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/view.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2/workflow.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/dmv2-serializer.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/internal.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/query_param.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/streaming/__init__.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/streaming/streaming_function_runner.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib/tasks.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib.egg-info/SOURCES.txt +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib.egg-info/dependency_links.txt +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib.egg-info/requires.txt +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/moose_lib.egg-info/top_level.txt +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/setup.cfg +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/setup.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/tests/__init__.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/tests/conftest.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/tests/test_moose.py +0 -0
- {moose_lib-0.5.21 → moose_lib-0.5.22}/tests/test_redis_client.py +0 -0
|
@@ -242,6 +242,25 @@ class WorkflowClient:
|
|
|
242
242
|
"body": str(e)
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
def terminate(self, workflow_id: str) -> Dict[str, Any]:
|
|
246
|
+
try:
|
|
247
|
+
asyncio.run(self._terminate_workflow_async(workflow_id))
|
|
248
|
+
print(f"WorkflowClient - terminated workflow: {workflow_id}")
|
|
249
|
+
return {
|
|
250
|
+
"status": 200,
|
|
251
|
+
"body": f"Workflow terminated: {workflow_id}"
|
|
252
|
+
}
|
|
253
|
+
except Exception as e:
|
|
254
|
+
print(f"WorkflowClient - error while terminating workflow: {e}")
|
|
255
|
+
return {
|
|
256
|
+
"status": 400,
|
|
257
|
+
"body": str(e)
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
async def _terminate_workflow_async(self, workflow_id: str):
|
|
261
|
+
workflow_handle = self.temporal_client.get_workflow_handle(workflow_id)
|
|
262
|
+
await workflow_handle.terminate()
|
|
263
|
+
|
|
245
264
|
async def _start_workflow_async(self, name: str, input_data: Any):
|
|
246
265
|
# Extract configuration based on workflow type
|
|
247
266
|
config = self._get_workflow_config(name)
|
|
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
|