Skip to content
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

feat: add Actor Standby documentation #1086

Merged
merged 11 commits into from
Jul 9, 2024
Merged

Conversation

mhamas
Copy link
Contributor

@mhamas mhamas commented Jun 27, 2024

CleanShot 2024-06-27 at 22 07 55@2x

@github-actions github-actions bot added the t-c&c Team covering store and finance matters. label Jun 27, 2024
@mhamas mhamas requested review from adelamikk, fnesveda and stetizu1 and removed request for adelamikk June 27, 2024 20:08
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Looks good, I left a few comments.

@jirimoravcik since Maťo is on vacation, can you check my suggestions, and if you're fine with them, just commit them?

sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
Copy link
Contributor

@stetizu1 stetizu1 left a comment

Choose a reason for hiding this comment

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

This should be probably checked by some native speaker 😅
Also not sure that mode has "the" article. 🤔

Content-wise ok, just the comments that are already there + nits

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, this needs to wait for public release 😅 Working on it, blocked by https://github.com/apify/apify-core/pull/16488

Copy link
Contributor

Choose a reason for hiding this comment

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

Current screenshots can be taken from
https://console-featstandbypublicrelease-a00865.apify.com/

Copy link
Contributor

Choose a reason for hiding this comment

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

This will look a bit different, currently in PR

sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
inputs and ouputs in your README.

#### Can I monetize my Actor in the Standby mode?
No, the Standby mode is currently in Beta and the monetization is not supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

[To consider]: I am thinking that some readme example would be nice, with #actor-standby header

Co-authored-by: František Nesveda <[email protected]>
Co-authored-by: Zuzana Štětinová <[email protected]>
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
@jirimoravcik jirimoravcik requested a review from TheoVasilis July 2, 2024 10:18
fix mdlint issues
remove unnecessary words
slight changes for clarity
Copy link
Contributor

@TC-MO TC-MO left a comment

Choose a reason for hiding this comment

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

LGTM

@jirimoravcik jirimoravcik requested a review from fnesveda July 3, 2024 13:08
@jirimoravcik jirimoravcik marked this pull request as ready for review July 3, 2024 13:20
@jirimoravcik jirimoravcik changed the title feat: actor standby draft feat: add Actor Standby documentation Jul 3, 2024
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Looks good, except that we need to add a section about how to actually develop the Standby Actors, and some example Actor etc.

sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
@jirimoravcik jirimoravcik requested a review from fnesveda July 8, 2024 12:51
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Looks good, I left a few suggestions


You can head to the Settings tab of your Actor, enable Standby mode, and set the default configuration.
![Standby for creators](./images/actor_standby/standby-creators.png)

For the coding part, you can use Apify SDK to retrieve the port Actor Standby should be listening on.
Copy link
Member

Choose a reason for hiding this comment

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

Can you talk here a bit more about how the Actors should behave internally before jumping straight to the code?

Sth like "Standby Actors should run a HTTP server listening on a specific port, to which the user requests will be proxied. This port is available in the Actor config object available in the Apify SDK."

Copy link
Member

Choose a reason for hiding this comment

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

Done

Comment on lines 73 to 96
<Tabs>
<TabItem value="JavaScript" label="JavaScript">

```js
import { Actor } from 'apify';

await Actor.init();
console.log(Actor.config.get('standbyPort'));
```

</TabItem>
<TabItem value="Python" label="Python">

```python
from apify import Actor, Configuration

async def main() -> None:
async with Actor:
config = Configuration.get_global_configuration()
print(config.standby_port)
```

</TabItem>
</Tabs>
Copy link
Member

Choose a reason for hiding this comment

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

I would skip this and go straight for the example with the HTTP server, it's not too complicated, so there's no need to split it into two examples.

Copy link
Member

Choose a reason for hiding this comment

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

Done

sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
@jirimoravcik jirimoravcik requested a review from fnesveda July 8, 2024 14:20
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

Looks good, just a few last suggestions and then we're good to go

sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
sources/platform/actors/running/actor_standby.md Outdated Show resolved Hide resolved
Co-authored-by: František Nesveda <[email protected]>
@stetizu1 stetizu1 requested a review from TheoVasilis July 9, 2024 09:43
@jirimoravcik jirimoravcik merged commit 5c7be08 into master Jul 9, 2024
6 of 7 checks passed
@jirimoravcik jirimoravcik deleted the feat/actor-standby branch July 9, 2024 13:15
honzajavorek pushed a commit to honzajavorek/apify-docs that referenced this pull request Jul 19, 2024
Co-authored-by: Jiří Moravčík <[email protected]>
Co-authored-by: František Nesveda <[email protected]>
Co-authored-by: Zuzana Štětinová <[email protected]>
Co-authored-by: TheoVasilis <[email protected]>
Co-authored-by: Michał Olender <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-c&c Team covering store and finance matters.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants