-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.
Description
Feature
There are now two new env vars: APIFY_CHARGED_ACTOR_EVENT_COUNTS
and APIFY_ACTOR_PRICING_INFO
plus there is still the existing ACTOR_MAX_TOTAL_CHARGE_USD
. These can be used to replace the pricing data currently fetched from GET Run endpoint. The types are the same as in the API just with description
stripped out.
The env vars are updated after the resurrect, so the behavior is consistent with refetching the GET Run endpoint now.
More details in Slack thread
Motivation
- Lower start latency by skipping the HTTP call
- More resistant to API rate limits. For some reason the charging manager init was vulnerable to crash the Actor if the per-account API rate limit was reached.
- This can make it easier to later implement local testing. The
ACTOR_MAX_TOTAL_CHARGE_USD
can be used locally and we could add a CLI helper to inject pricing env vars from local JSON files.
Ideal solution or implementation, and any additional constraints
Don't think there is any complication unless the platform somehow messes up the stringification :)
Alternative solutions or implementations
No response
Other context
No response
Metadata
Metadata
Assignees
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.