File tree Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Original file line number Diff line number Diff line change 66async def main () -> None :
77 await Actor .init ()
88
9- # Get input
10- actor_input = await Actor .get_input ()
11- Actor .log .info ('Actor input: %s' , actor_input )
9+ try :
10+ # Get input
11+ actor_input = await Actor .get_input ()
12+ Actor .log .info ('Actor input: %s' , actor_input )
1213
13- # Your Actor logic here
14- data = {'message' : 'Hello from Actor!' , 'input' : actor_input }
15- await Actor .push_data (data )
14+ # Your Actor logic here
15+ data = {'message' : 'Hello from Actor!' , 'input' : actor_input }
16+ await Actor .push_data (data )
1617
17- # Set status message
18- await Actor .set_status_message ('Actor completed successfully' )
18+ # Set status message
19+ await Actor .set_status_message ('Actor completed successfully' )
1920
20- await Actor .exit ()
21+ finally :
22+ await Actor .exit ()
2123
2224
2325if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ async def main() -> None:
2020 await actor .push_data (data )
2121
2222 # Set status message
23- await Actor .set_status_message ('Actor completed successfully' )
23+ await actor .set_status_message ('Actor completed successfully' )
2424
2525
2626if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -12,18 +12,20 @@ async def main() -> None:
1212
1313 await actor .init ()
1414
15- # Get input
16- actor_input = await actor .get_input ()
17- actor .log .info ('Actor input: %s' , actor_input )
15+ try :
16+ # Get input
17+ actor_input = await actor .get_input ()
18+ actor .log .info ('Actor input: %s' , actor_input )
1819
19- # Your Actor logic here
20- data = {'message' : 'Hello from Actor!' , 'input' : actor_input }
21- await actor .push_data (data )
20+ # Your Actor logic here
21+ data = {'message' : 'Hello from Actor!' , 'input' : actor_input }
22+ await actor .push_data (data )
2223
23- # Set status message
24- await actor .set_status_message ('Actor completed successfully' )
24+ # Set status message
25+ await actor .set_status_message ('Actor completed successfully' )
2526
26- await actor .exit ()
27+ finally :
28+ await actor .exit ()
2729
2830
2931if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments