-
Notifications
You must be signed in to change notification settings - Fork 12
fix: Use same client_key
for Actor
created request_queue
and improve its metadata estimation
#552
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
Seems to be some problem on the platform?
Platform acknowledged it is a bug
As of now, the In develop branch: https://github.com/apify/apify-worker/pull/1470 |
Update leftover id-based variable names
The necessary fix on the platform was merged to master, and it is working now. |
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.
Looks good, let's see how it behaves...
I'm just not sure about the feat:
🙂, maybe rather a fix?
client_key
for Actor
created request_queue
and improve its metadata estimationclient_key
for Actor
created request_queue
and improve its metadata estimation
Description
RequestQueue
from Actor on the platform or withforce_cloud=True
theclient_key
should be set torun_id
. This ensures:RequestQueue
instance that is usingApifyRequestQueueClient
will be done with the sameclient_key
and thus in metadatahad_multiple_clients=False
Actor.open_request_queue()
on the platform share the sameclient_key
and thus in metadatahad_multiple_clients=False
client_key
is set torun_id
, it remains the same for resurrected or migrated run, and thus in metadatahad_multiple_clients=False
had_multiple_clients
allows better estimation ofRequestQueue
metadata.had_multiple_clients=False
, it is possible to trust local estimation of the metadata.had_multiple_clients=True
, local estimation is no longer valid, but still can, in some cases, improve estimation by being ahead of the delayed API update of the metadata. Therefore API-based metadata are fused with local metadata estimation to produce as good estimation as we can.ApifyRequestQueueClient
init changed to properly initialize from full metadata - to enable more reliable metadata after migration/resurrection or when using existingRequestQueue
_list_head
, if there is a call to API, use the availablehad_multiple_clients
to update local estimation of this value. This is a cheap way of knowing if there is another client or not without the need to make a new API call._list_head
is called frequently enough to make the local estimation ofhad_multiple_clients
decently good.Issues
client_key
for all ApifyRequestQueue client calls #536Testing