Skip to content

Commit 305bbbd

Browse files
committed
Remove existing duplicate import
1 parent 00f8d1c commit 305bbbd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

durabletask/worker.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import grpc
1616
from google.protobuf import empty_pb2
1717

18-
import durabletask.internal.helpers as pbh
1918
import durabletask.internal.helpers as ph
2019
import durabletask.internal.orchestrator_service_pb2 as pb
2120
import durabletask.internal.orchestrator_service_pb2_grpc as stubs
@@ -511,16 +510,16 @@ def _execute_orchestrator(
511510
res = pb.OrchestratorResponse(
512511
instanceId=req.instanceId,
513512
actions=result.actions,
514-
customStatus=pbh.get_string_value(result.encoded_custom_status),
513+
customStatus=ph.get_string_value(result.encoded_custom_status),
515514
completionToken=completionToken,
516515
)
517516
except Exception as ex:
518517
self._logger.exception(
519518
f"An error occurred while trying to execute instance '{req.instanceId}': {ex}"
520519
)
521-
failure_details = pbh.new_failure_details(ex)
520+
failure_details = ph.new_failure_details(ex)
522521
actions = [
523-
pbh.new_complete_orchestration_action(
522+
ph.new_complete_orchestration_action(
524523
-1, pb.ORCHESTRATION_STATUS_FAILED, "", failure_details
525524
)
526525
]
@@ -552,14 +551,14 @@ def _execute_activity(
552551
res = pb.ActivityResponse(
553552
instanceId=instance_id,
554553
taskId=req.taskId,
555-
result=pbh.get_string_value(result),
554+
result=ph.get_string_value(result),
556555
completionToken=completionToken,
557556
)
558557
except Exception as ex:
559558
res = pb.ActivityResponse(
560559
instanceId=instance_id,
561560
taskId=req.taskId,
562-
failureDetails=pbh.new_failure_details(ex),
561+
failureDetails=ph.new_failure_details(ex),
563562
completionToken=completionToken,
564563
)
565564

@@ -924,7 +923,7 @@ def execute(
924923
elif (
925924
ctx._completion_status and ctx._completion_status is not pb.ORCHESTRATION_STATUS_CONTINUED_AS_NEW
926925
):
927-
completion_status_str = pbh.get_orchestration_status_str(
926+
completion_status_str = ph.get_orchestration_status_str(
928927
ctx._completion_status
929928
)
930929
self._logger.info(

0 commit comments

Comments
 (0)