Skip to content

Commit b4807bc

Browse files
committed
Add comments
1 parent 3b87475 commit b4807bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/apify/_charging.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ async def init(self) -> None:
5555
self._charging_state = {}
5656

5757
if self._is_at_home:
58+
# Running on the Apify platform - fetch pricing info for the current run.
59+
5860
if self._actor_run_id is None:
5961
raise RuntimeError('Actor run ID not found even though the Actor is running on Apify')
6062

@@ -82,6 +84,9 @@ async def init(self) -> None:
8284
)
8385

8486
if not self._is_at_home and self._pricing_model == 'PAY_PER_EVENT':
87+
# We are not running on the Apify platform, but PPE is enabled for testing - open a dataset that
88+
# will contain a log of all charge calls for debugging purposes.
89+
8590
if self._purge_charging_log_dataset:
8691
dataset = await Dataset.open(name=self.LOCAL_CHARGING_LOG_DATASET_NAME)
8792
await dataset.drop()

0 commit comments

Comments
 (0)