Skip to content

Conversation

@metalwarrior665
Copy link
Member

…section

@metalwarrior665 metalwarrior665 merged commit 31ba8be into master Aug 27, 2024
@metalwarrior665 metalwarrior665 deleted the academy/max-items-example branch August 27, 2024 13:22
1. Set `minMemoryMbytes` and `maxMemoryMBytes` in [`actor.json`](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) in your Actor folder. If users use more memory than you counted with in your price estimations, their runs will generate more underlying platform usage and will cost you more, which might affect your profit margin.

2. Always check `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable in your Actor code. Your Actor should never return more than `ACTOR_MAX_PAID_DATASET_ITEMS` results, because the user will be not charged for more and you could start generating losses. This variable is configurable by the user to limit how much the run will cost them.
2. Always check `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable in your Actor code. Your Actor should never return more than `ACTOR_MAX_PAID_DATASET_ITEMS` results, because the user will be not charged for more and you could start generating losses. This variable is configurable by the user to limit how much the run will cost them. You can copy paste [this code](https://github.com/metalwarrior665/max-paid-items-example/blob/master/src/push-data.ts#L12) to your project to make pushing data aware of the max paid dataset items.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link could use GitHub's permalink feature, so that it won't break in the future (or at least not easily):

https://github.com/metalwarrior665/max-paid-items-example/blob/58f3ab25781df4f5baf85d26330fa852b18d330e/src/push-data.ts#L12

Unless you expect changes to that code and want the link to always point to the latest code. But in that case the line numbers could change. I don't think GitHub supports linking to a symbol.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good point but I don't think we will touch this ever again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants