Skip to content

Commit d099e17

Browse files
committed
review feedback
1 parent c92e6e3 commit d099e17

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

docs/03_concepts/12_pay_per_event.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you need finer control over charging, you can access call <ApiLink to="class/
2727

2828
## Transitioning from a different pricing model
2929

30-
When you plan to start using the pay-per-event pricing model for an Actor that is already monetized with a different pricing model, your source code will need support both pricing models during the transition period enforced by the Apify platform. Arguably the most frequent case is the transition from the pay-per-result model which utilizes the `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable to prevent returning unpaid dataset items. The following is an example how to handle such scenarios. The key part is the <ApiLink to="class/ChargingManager#get_pricing_info">`ChargingManager.get_pricing_info`</ApiLink> method which returns information about the current pricing model.
30+
When you plan to start using the pay-per-event pricing model for an Actor that is already monetized with a different pricing model, your source code will need support both pricing models during the transition period enforced by the Apify platform. Arguably the most frequent case is the transition from the pay-per-result model which utilizes the `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable to prevent returning unpaid dataset items. The following is an example how to handle such scenarios. The key part is the <ApiLink to="class/ChargingManager#get_pricing_info">`ChargingManager.get_pricing_info()`</ApiLink> method which returns information about the current pricing model.
3131

3232
<CodeBlock language="python">
3333
{ConditionalActorChargeSource}

website/src/components/ApiLink.jsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,10 @@
11
import React from 'react';
22
import Link from '@docusaurus/Link';
3-
// eslint-disable-next-line import/no-extraneous-dependencies
4-
import { useDocsVersion } from '@docusaurus/theme-common/internal';
5-
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
6-
7-
// const pkg = require('../../../packages/crawlee/package.json');
8-
//
9-
// const [v1, v2] = pkg.version.split('.');
10-
// const stable = [v1, v2].join('.');
113

124
const ApiLink = ({ to, children }) => {
135
return (
146
<Link to={`/reference/${to}`}>{children}</Link>
157
);
16-
17-
// const version = useDocsVersion();
18-
// const { siteConfig } = useDocusaurusContext();
19-
//
20-
// // if (siteConfig.presets[0][1].docs.disableVersioning || version.version === stable) {
21-
// if (siteConfig.presets[0][1].docs.disableVersioning) {
22-
// return (
23-
// <Link to={`/api/${to}`}>{children}</Link>
24-
// );
25-
// }
26-
//
27-
// return (
28-
// <Link to={`/api/${version.version === 'current' ? 'next' : version.version}/${to}`}>{children}</Link>
29-
// );
308
};
319

3210
export default ApiLink;

0 commit comments

Comments
 (0)