|
15 | 15 | import grpc |
16 | 16 | from google.protobuf import empty_pb2 |
17 | 17 |
|
18 | | -import durabletask.internal.helpers as pbh |
19 | 18 | import durabletask.internal.helpers as ph |
20 | 19 | import durabletask.internal.orchestrator_service_pb2 as pb |
21 | 20 | import durabletask.internal.orchestrator_service_pb2_grpc as stubs |
@@ -511,16 +510,16 @@ def _execute_orchestrator( |
511 | 510 | res = pb.OrchestratorResponse( |
512 | 511 | instanceId=req.instanceId, |
513 | 512 | actions=result.actions, |
514 | | - customStatus=pbh.get_string_value(result.encoded_custom_status), |
| 513 | + customStatus=ph.get_string_value(result.encoded_custom_status), |
515 | 514 | completionToken=completionToken, |
516 | 515 | ) |
517 | 516 | except Exception as ex: |
518 | 517 | self._logger.exception( |
519 | 518 | f"An error occurred while trying to execute instance '{req.instanceId}': {ex}" |
520 | 519 | ) |
521 | | - failure_details = pbh.new_failure_details(ex) |
| 520 | + failure_details = ph.new_failure_details(ex) |
522 | 521 | actions = [ |
523 | | - pbh.new_complete_orchestration_action( |
| 522 | + ph.new_complete_orchestration_action( |
524 | 523 | -1, pb.ORCHESTRATION_STATUS_FAILED, "", failure_details |
525 | 524 | ) |
526 | 525 | ] |
@@ -552,14 +551,14 @@ def _execute_activity( |
552 | 551 | res = pb.ActivityResponse( |
553 | 552 | instanceId=instance_id, |
554 | 553 | taskId=req.taskId, |
555 | | - result=pbh.get_string_value(result), |
| 554 | + result=ph.get_string_value(result), |
556 | 555 | completionToken=completionToken, |
557 | 556 | ) |
558 | 557 | except Exception as ex: |
559 | 558 | res = pb.ActivityResponse( |
560 | 559 | instanceId=instance_id, |
561 | 560 | taskId=req.taskId, |
562 | | - failureDetails=pbh.new_failure_details(ex), |
| 561 | + failureDetails=ph.new_failure_details(ex), |
563 | 562 | completionToken=completionToken, |
564 | 563 | ) |
565 | 564 |
|
@@ -924,7 +923,7 @@ def execute( |
924 | 923 | elif ( |
925 | 924 | ctx._completion_status and ctx._completion_status is not pb.ORCHESTRATION_STATUS_CONTINUED_AS_NEW |
926 | 925 | ): |
927 | | - completion_status_str = pbh.get_orchestration_status_str( |
| 926 | + completion_status_str = ph.get_orchestration_status_str( |
928 | 927 | ctx._completion_status |
929 | 928 | ) |
930 | 929 | self._logger.info( |
|
0 commit comments