Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/apify/_charging.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ def calculate_chargeable() -> dict[str, int | None]:
# START OF CRITICAL SECTION - no awaits here

# Determine the maximum amount of events that can be charged within the budget
charged_count = min(count, self.calculate_max_event_charge_count_within_limit(event_name) or count)
max_chargeable = self.calculate_max_event_charge_count_within_limit(event_name)
charged_count = min(count, max_chargeable if max_chargeable is not None else count)

if charged_count == 0:
return ChargeResult(
Expand Down