File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
sources/platform/actors/publishing/monetize Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ export const pushDataMaxAware = async (data: Parameters<Actor['pushData']>[0]):
118118
119119``` python
120120import os
121+ import asyncio
121122from apify import Actor
122123from typing import Union, List, Dict, Any
123124
@@ -143,9 +144,9 @@ class PayPerResultManager:
143144 self .is_getting_item_count = False
144145 self .is_initialized = True
145146
146- # Others handlers will wait until initialized which should be few milliseconds
147+ # Wait until initialized
147148 while not self .is_initialized:
148- await Actor .sleep(0.05 )
149+ await asyncio .sleep(0.05 ) # 50ms
149150
150151 data_as_array = data if isinstance (data, list ) else [data]
151152 data_to_push = data_as_array[:self .max_items - self .pushed_item_count]
You can’t perform that action at this time.
0 commit comments