fix: Keep track of synthetic apify-default-dataset-item events#814
Open
Mantisus wants to merge 9 commits intoapify:masterfrom
Open
fix: Keep track of synthetic apify-default-dataset-item events#814Mantisus wants to merge 9 commits intoapify:masterfrom
Mantisus wants to merge 9 commits intoapify:masterfrom
Conversation
vdusek
reviewed
Feb 27, 2026
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
vdusek
reviewed
Mar 3, 2026
Contributor
|
FYI - apify/apify-sdk-js#570 - this should not be a problem in the Python version, but please make sure. |
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
vdusek
reviewed
Mar 4, 2026
Comment on lines
+245
to
246
| @_ensure_context | ||
| @_ensure_context |
Contributor
There was a problem hiding this comment.
Duplicate @_ensure_context decorators 🙂, applies to all occurences here
| configuration=configuration, | ||
| ) | ||
|
|
||
| dataset_client.is_default_dataset = all(v is None for v in (id, name, alias)) |
Contributor
There was a problem hiding this comment.
The Apify client also matches when id == configuration.default_dataset_id.
| """Context manager to acquire the charge lock if PPE charging manager is active.""" | ||
| charging_manager = charging_manager_ctx.get() | ||
| if charging_manager: | ||
| if charging_manager.charge_lock.locked(): |
Contributor
There was a problem hiding this comment.
Hmm, asyncio.Lock.locked() tells whether any coroutine currently holds the lock. Doesn't that mean we would skip acquiring the lock and run unsynchronized? That would defeat the purpose of the lock in the first place. Am I missing something?
vdusek
reviewed
Mar 4, 2026
Contributor
vdusek
left a comment
There was a problem hiding this comment.
My last comments were sent. Could you @janbuchar now please check it as well?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
_DatasetClientPPEMixinto dataset storage clients to automatically charge for the syntheticapify-default-dataset-itemevent on every push to the default dataset.Actor.push_data()to account for the combined explicit + synthetic event price when enforcing budget limits.Issues
Testing