4
4
import random
5
5
import string
6
6
import time
7
- from typing import Any
7
+ from typing import TYPE_CHECKING , Any
8
8
9
9
from apify_shared .utils import filter_out_none_values_recursively , ignore_docs , parse_date_fields
10
10
15
15
from apify_client .clients .resource_clients .log import LogClient , LogClientAsync
16
16
from apify_client .clients .resource_clients .request_queue import RequestQueueClient , RequestQueueClientAsync
17
17
18
+ if TYPE_CHECKING :
19
+ from decimal import Decimal
20
+
18
21
19
22
class RunClient (ActorJobBaseClient ):
20
23
"""Sub-client for manipulating a single Actor run."""
@@ -132,6 +135,8 @@ def resurrect(
132
135
build : str | None = None ,
133
136
memory_mbytes : int | None = None ,
134
137
timeout_secs : int | None = None ,
138
+ max_items : int | None = None ,
139
+ max_total_charge_usd : Decimal | None = None ,
135
140
) -> dict :
136
141
"""Resurrect a finished Actor run.
137
142
@@ -147,6 +152,10 @@ def resurrect(
147
152
uses the same memory limit as before.
148
153
timeout_secs: New timeout for the resurrected run, in seconds. By default, the resurrected run uses the
149
154
same timeout as before.
155
+ max_items: Maximum number of items that the resurrected pay-per-result run will return. By default, the
156
+ resurrected run uses the same limit as before. Limit can be only increased.
157
+ max_total_charge_usd: Maximum cost for the resurrected pay-per-event run in USD. By default, the
158
+ resurrected run uses the same limit as before. Limit can be only increased.
150
159
151
160
Returns:
152
161
The Actor run data.
@@ -155,6 +164,8 @@ def resurrect(
155
164
build = build ,
156
165
memory = memory_mbytes ,
157
166
timeout = timeout_secs ,
167
+ maxItems = max_items ,
168
+ maxTotalChargeUsd = max_total_charge_usd ,
158
169
)
159
170
160
171
response = self .http_client .call (
@@ -385,6 +396,8 @@ async def resurrect(
385
396
build : str | None = None ,
386
397
memory_mbytes : int | None = None ,
387
398
timeout_secs : int | None = None ,
399
+ max_items : int | None = None ,
400
+ max_total_charge_usd : Decimal | None = None ,
388
401
) -> dict :
389
402
"""Resurrect a finished Actor run.
390
403
@@ -400,6 +413,10 @@ async def resurrect(
400
413
uses the same memory limit as before.
401
414
timeout_secs: New timeout for the resurrected run, in seconds. By default, the resurrected run uses the
402
415
same timeout as before.
416
+ max_items: Maximum number of items that the resurrected pay-per-result run will return. By default, the
417
+ resurrected run uses the same limit as before. Limit can be only increased.
418
+ max_total_charge_usd: Maximum cost for the resurrected pay-per-event run in USD. By default, the
419
+ resurrected run uses the same limit as before. Limit can be only increased.
403
420
404
421
Returns:
405
422
The Actor run data.
@@ -408,6 +425,8 @@ async def resurrect(
408
425
build = build ,
409
426
memory = memory_mbytes ,
410
427
timeout = timeout_secs ,
428
+ maxItems = max_items ,
429
+ maxTotalChargeUsd = max_total_charge_usd ,
411
430
)
412
431
413
432
response = await self .http_client .call (
0 commit comments