-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Add stats to ApifyRequestQueueClient
#574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ApifyRequestQueueClient
metadata = await request_queue_force_cloud.get_metadata() | ||
|
||
assert hasattr(metadata, 'stats') | ||
apify_metadata = cast('ApifyRequestQueueMetadata', metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see much value in this, since typing casts are required anyway, instead of simply allowing extra fields in the Pydantic model, or omitting this altogether and using the Apify client directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more about showing that force_cloud=True
created RQ will have the stats. If that is the case, then it is implicitly proven that even the client has them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant this whole PR, as we discussed on Slack here.
Description
ApifyRequestQueueMetadata
that contains Apify-specificRequestQueueStats
ApifyRequestQueueClient
Issues
stats
to RequestQueue crawlee-python#1344