I am waiting for a signal but getting “Potential deadlock detected” error. Workflow is still running so I assume maybe something is not configured correctly.
@workflow.defn
class RequestDataWorkflow:
def __init__(self) -> None:
self._result = None
@workflow.run
async def run(self, params: RequestDataParams) -> RequestDataResult:
activity_params = Params(
to_email=params.email,
first_name=params.first_name,
last_name=params.tlast_name,
sender_first_name=params.user_first_name,
sender_last_name=params.user_last_name
)
activity_results = await workflow.execute_activity(
send_email,
activity_params,
schedule_to_close_timeout=timedelta(seconds=5)
)
while True:
if not (self._result is None):
return RequestDataResult(
conversation_id=activity_results.conversation_id,
number=self._request_sin_workflow_result.number,
first_name=self._request_sin_workflow_result.first_name,
ast_name=self._request_sin_workflow_result.last_name,
middle_name=self._request_sin_workflow_result.middle_name
)
@workflow.signal(name="FORM_SUBMITTED")
async def submit_greeting(self, res: RequestDataResult) -> None:
self._result = res