|
2 | 2 |
|
3 | 3 | import asyncio |
4 | 4 | import json |
| 5 | +from datetime import timedelta |
5 | 6 | from typing import TYPE_CHECKING |
6 | 7 |
|
7 | 8 | from apify_client._models import ActorPermissionLevel |
@@ -147,7 +148,7 @@ async def main_outer() -> None: |
147 | 148 |
|
148 | 149 | assert run_result_outer.status.value == 'SUCCEEDED' |
149 | 150 |
|
150 | | - await inner_actor.last_run().wait_for_finish(wait_secs=600) |
| 151 | + await inner_actor.last_run().wait_for_finish(wait_duration=timedelta(seconds=600)) |
151 | 152 |
|
152 | 153 | inner_output_record = await inner_actor.last_run().key_value_store().get_record('OUTPUT') |
153 | 154 | assert inner_output_record is not None |
@@ -196,7 +197,7 @@ async def main_outer() -> None: |
196 | 197 |
|
197 | 198 | assert run_result_outer.status.value == 'SUCCEEDED' |
198 | 199 |
|
199 | | - await inner_actor.last_run().wait_for_finish(wait_secs=600) |
| 200 | + await inner_actor.last_run().wait_for_finish(wait_duration=timedelta(seconds=600)) |
200 | 201 |
|
201 | 202 | inner_output_record = await inner_actor.last_run().key_value_store().get_record('OUTPUT') |
202 | 203 | assert inner_output_record is not None |
@@ -252,7 +253,7 @@ async def main_outer() -> None: |
252 | 253 |
|
253 | 254 | assert run_result_outer.status.value == 'SUCCEEDED' |
254 | 255 |
|
255 | | - await inner_actor.last_run().wait_for_finish(wait_secs=600) |
| 256 | + await inner_actor.last_run().wait_for_finish(wait_duration=timedelta(seconds=600)) |
256 | 257 |
|
257 | 258 | inner_output_record = await inner_actor.last_run().key_value_store().get_record('OUTPUT') |
258 | 259 | assert inner_output_record is not None |
@@ -295,7 +296,7 @@ async def main_outer() -> None: |
295 | 296 | assert run_result_outer.status.value == 'SUCCEEDED' |
296 | 297 |
|
297 | 298 | inner_actor_run_client = inner_actor.last_run() |
298 | | - inner_actor_run = await inner_actor_run_client.wait_for_finish(wait_secs=600) |
| 299 | + inner_actor_run = await inner_actor_run_client.wait_for_finish(wait_duration=timedelta(seconds=600)) |
299 | 300 |
|
300 | 301 | if inner_actor_run is None: |
301 | 302 | raise AssertionError('Failed to get inner actor run after aborting it.') |
@@ -477,7 +478,7 @@ async def main_client() -> None: |
477 | 478 | assert ac_run_result.status.value == 'SUCCEEDED' |
478 | 479 |
|
479 | 480 | sa_run_client = server_actor.last_run() |
480 | | - sa_run_client_run = await sa_run_client.wait_for_finish(wait_secs=600) |
| 481 | + sa_run_client_run = await sa_run_client.wait_for_finish(wait_duration=timedelta(seconds=600)) |
481 | 482 |
|
482 | 483 | if sa_run_client_run is None: |
483 | 484 | raise AssertionError('Failed to get server actor run after waiting for finish.') |
|
0 commit comments