Skip to content

Commit 55d2efb

Browse files
committed
Fix broken code after sdk upgrades
1 parent 5a551fc commit 55d2efb

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

moneytransfer/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
flask_app = Flask(__name__)
1818

1919

20-
# http://localhost:8802/moneytransfer/start
20+
# http://localhost:8802/moneytransfer/start?fromAccount=long&toAccount=github&amount=10&notes=testnotest
2121
@flask_app.route("/moneytransfer/start")
2222
def money_transfer_start():
2323
from_account = request.args["fromAccount"]

moneytransfer/money_transfer_workflow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def execute(
5454

5555
def get_state_options(self) -> WorkflowStateOptions:
5656
return WorkflowStateOptions(
57-
execute_failure_handling_state=CompensateState,
57+
proceed_to_state_when_execute_retry_exhausted=CompensateState,
5858
execute_api_retry_policy=RetryPolicy(
5959
maximum_attempts_duration_seconds=3600,
6060
# replace with this to try a shorter retry
@@ -78,7 +78,7 @@ def execute(
7878

7979
def get_state_options(self) -> WorkflowStateOptions:
8080
return WorkflowStateOptions(
81-
execute_failure_handling_state=CompensateState,
81+
proceed_to_state_when_execute_retry_exhausted=CompensateState,
8282
execute_api_retry_policy=RetryPolicy(
8383
maximum_attempts_duration_seconds=3600,
8484
)
@@ -100,7 +100,7 @@ def execute(
100100

101101
def get_state_options(self) -> WorkflowStateOptions:
102102
return WorkflowStateOptions(
103-
execute_failure_handling_state=CompensateState,
103+
proceed_to_state_when_execute_retry_exhausted=CompensateState,
104104
execute_api_retry_policy=RetryPolicy(
105105
maximum_attempts_duration_seconds=3600,
106106
)
@@ -123,7 +123,7 @@ def execute(
123123

124124
def get_state_options(self) -> WorkflowStateOptions:
125125
return WorkflowStateOptions(
126-
execute_failure_handling_state=CompensateState,
126+
proceed_to_state_when_execute_retry_exhausted=CompensateState,
127127
execute_api_retry_policy=RetryPolicy(
128128
maximum_attempts_duration_seconds=3600,
129129
)

signup/signup_workflow.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from dataclasses import dataclass
2-
from datetime import timedelta
32

43
from iwf.command_request import CommandRequest, InternalChannelCommand, TimerCommand
54
from iwf.command_results import CommandResults
@@ -54,9 +53,7 @@ def wait_until(
5453
communication: Communication,
5554
) -> CommandRequest:
5655
return CommandRequest.for_any_command_completed(
57-
TimerCommand.timer_command_by_duration(
58-
timedelta(seconds=10)
59-
), # use 10 seconds for demo
56+
TimerCommand.by_seconds(10), # use 10 seconds for demo
6057
InternalChannelCommand.by_name(verify_channel),
6158
)
6259

@@ -93,7 +90,7 @@ def get_persistence_schema(self) -> PersistenceSchema:
9390

9491
def get_communication_schema(self) -> CommunicationSchema:
9592
return CommunicationSchema.create(
96-
CommunicationMethod.internal_channel_def(verify_channel, None)
93+
CommunicationMethod.internal_channel_def(verify_channel, type(None))
9794
)
9895

9996
@rpc(

0 commit comments

Comments
 (0)