File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,10 +362,18 @@ async def register_decision_timeout_check(expense_id: str) -> None:
362362 # Check that we're called with 10 minute timeout
363363 activity_info = activity .info ()
364364 timeout_calls .append (("wait" , activity_info .start_to_close_timeout ))
365- # Simulate automatic decision if one was scheduled
365+ # In time-skipping mode, send the decision immediately
366366 if expense_id in mock_ui .scheduled_decisions :
367- # Decision will be sent by the scheduled task
368- pass
367+ decision = mock_ui .scheduled_decisions [expense_id ]
368+ if expense_id in mock_ui .workflow_map :
369+ workflow_id = mock_ui .workflow_map [expense_id ]
370+ handle = client .get_workflow_handle (workflow_id )
371+ try :
372+ # Send signal immediately when registering
373+ await handle .signal ("expense_decision_signal" , decision )
374+ except Exception :
375+ # Ignore errors in time-skipping mode
376+ pass
369377 return None
370378
371379 return register_decision_timeout_check
You can’t perform that action at this time.
0 commit comments