File tree Expand file tree Collapse file tree 4 files changed +1
-34
lines changed
Expand file tree Collapse file tree 4 files changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,6 @@ class ActivityCancellationDetails:
162162 def _from_proto (
163163 proto : temporalio .bridge .proto .activity_task .ActivityCancellationDetails ,
164164 ) -> ActivityCancellationDetails :
165- print (f"Building activity cancellation details, reset: { proto .is_reset } " )
166165 return ActivityCancellationDetails (
167166 not_found = proto .is_not_found ,
168167 cancel_requested = proto .is_cancelled ,
Original file line number Diff line number Diff line change 3434logger = logging .getLogger (__name__ )
3535
3636# Set to true to log all requests and responses
37- LOG_PROTOS = True
37+ LOG_PROTOS = False
3838
3939
4040@dataclass
Original file line number Diff line number Diff line change @@ -152,8 +152,6 @@ async def raise_from_exception_queue() -> NoReturn:
152152 await exception_task
153153 task = await poll_task
154154
155- logger .info (f"Activity task { task } " )
156-
157155 if task .HasField ("start" ):
158156 # Cancelled event and sync field will be updated inside
159157 # _run_activity when the activity function is obtained. Max
Original file line number Diff line number Diff line change @@ -1489,36 +1489,6 @@ async def h():
14891489 assert result .result == "details: Some detail"
14901490
14911491
1492- async def test_activity_reset (client : Client , worker : ExternalWorker ):
1493- @activity .defn
1494- async def reset_activity () -> None :
1495- req = temporalio .api .workflowservice .v1 .ResetActivityRequest (
1496- namespace = client .namespace ,
1497- execution = temporalio .api .common .v1 .WorkflowExecution (
1498- workflow_id = activity .info ().workflow_id ,
1499- run_id = activity .info ().workflow_run_id ,
1500- ),
1501- id = activity .info ().activity_id ,
1502- )
1503- activity .logger .info (f"Sending reset request: { req } " )
1504- await client .workflow_service .reset_activity (req )
1505- reset = False
1506- for _ in range (5 ):
1507- activity .heartbeat ()
1508- try :
1509- if reset :
1510- return None
1511- await asyncio .sleep (0.3 )
1512- except Exception as e :
1513- activity .logger .warning ("Exception: " , e )
1514- reset = True
1515- raise
1516-
1517- assert False
1518-
1519- await _execute_workflow_with_activity (client , worker , reset_activity )
1520-
1521-
15221492async def test_activity_reset_catch (client : Client , worker : ExternalWorker ):
15231493 @activity .defn
15241494 async def wait_cancel () -> str :
You can’t perform that action at this time.
0 commit comments