|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import asyncio
|
|
|
|
from typing import Dict, List, Optional
|
|
|
|
from typing import Dict, List, Optional
|
|
|
|
from temporalio.client import Client
|
|
|
|
from temporalio.client import Client
|
|
|
|
from fastapi import APIRouter, HTTPException, status
|
|
|
|
from fastapi import APIRouter, HTTPException, status
|
|
|
|
@ -76,13 +77,13 @@ async def get_target_reliability(
|
|
|
|
print(f"Workflow {workflow_id} finished with status: {status}")
|
|
|
|
print(f"Workflow {workflow_id} finished with status: {status}")
|
|
|
|
return status
|
|
|
|
return status
|
|
|
|
|
|
|
|
|
|
|
|
print(f"Workflow {workflow_id} still {status}, checking again in {interval} seconds...")
|
|
|
|
print(f"Workflow {workflow_id} still {status}, checking again in {30} seconds...")
|
|
|
|
|
|
|
|
|
|
|
|
except WorkflowNotFoundError:
|
|
|
|
except Exception as e:
|
|
|
|
print(f"Workflow {workflow_id} not found, treating as done.")
|
|
|
|
print(f"Workflow {workflow_id} not found, treating as done.")
|
|
|
|
return "NOT_FOUND"
|
|
|
|
return "NOT_FOUND"
|
|
|
|
|
|
|
|
|
|
|
|
await asyncio.sleep(interval)
|
|
|
|
await asyncio.sleep(30)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|