@@ -30,7 +30,7 @@ async def main() -> None:
30
30
31
31
# Start another run of this actor with timeout set to the time remaining in this actor run
32
32
other_run_data = await Actor .call (
33
- actor_id = Actor .configuration .actor_id or '' ,
33
+ actor_id = Actor .config .actor_id or '' ,
34
34
run_input = {'called_from_another_actor' : True },
35
35
timeout = 'RemainingTime' ,
36
36
)
@@ -39,13 +39,13 @@ async def main() -> None:
39
39
# To make sure that the actor is started
40
40
await asyncio .sleep (5 )
41
41
assert other_run_data .options is not None
42
- assert Actor .configuration .timeout_at is not None
43
- assert Actor .configuration .started_at is not None
42
+ assert Actor .config .timeout_at is not None
43
+ assert Actor .config .started_at is not None
44
44
45
- remaining_time_after_actor_start = Actor .configuration .timeout_at - datetime .now (tz = timezone .utc )
45
+ remaining_time_after_actor_start = Actor .config .timeout_at - datetime .now (tz = timezone .utc )
46
46
47
47
assert other_run_data .options .timeout > remaining_time_after_actor_start
48
- assert other_run_data .options .timeout < Actor .configuration .timeout_at - Actor .configuration .started_at
48
+ assert other_run_data .options .timeout < Actor .config .timeout_at - Actor .config .started_at
49
49
finally :
50
50
# Make sure the other actor run is aborted
51
51
await Actor .apify_client .run (other_run_data .id ).abort ()
@@ -77,7 +77,7 @@ async def main() -> None:
77
77
78
78
# Start another run of this actor with timeout set to the time remaining in this actor run
79
79
other_run_data = await Actor .call (
80
- actor_id = Actor .configuration .actor_id or '' ,
80
+ actor_id = Actor .config .actor_id or '' ,
81
81
run_input = {'called_from_another_actor' : True },
82
82
timeout = 'RemainingTime' ,
83
83
)
@@ -88,13 +88,13 @@ async def main() -> None:
88
88
await asyncio .sleep (5 )
89
89
90
90
assert other_run_data .options is not None
91
- assert Actor .configuration .timeout_at is not None
92
- assert Actor .configuration .started_at is not None
91
+ assert Actor .config .timeout_at is not None
92
+ assert Actor .config .started_at is not None
93
93
94
- remaining_time_after_actor_start = Actor .configuration .timeout_at - datetime .now (tz = timezone .utc )
94
+ remaining_time_after_actor_start = Actor .config .timeout_at - datetime .now (tz = timezone .utc )
95
95
96
96
assert other_run_data .options .timeout > remaining_time_after_actor_start
97
- assert other_run_data .options .timeout < Actor .configuration .timeout_at - Actor .configuration .started_at
97
+ assert other_run_data .options .timeout < Actor .config .timeout_at - Actor .config .started_at
98
98
finally :
99
99
# Make sure the other actor run is aborted
100
100
await Actor .apify_client .run (other_run_data .id ).abort ()
0 commit comments