Skip to content

Commit db7f857

Browse files
authored
PCX review
1 parent 410091a commit db7f857

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/content/docs/sandbox/api/sessions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Every sandbox has a default session that automatically maintains shell state. Cr
1414
:::
1515

1616
:::note
17-
For sandbox-level configuration options like `keepAlive`, see the [Sandbox options configuration](/sandbox/configuration/sandbox-options/).
17+
For sandbox-level configuration options like `keepAlive`, refer to the [Sandbox options configuration](/sandbox/configuration/sandbox-options/).
1818
:::
1919

2020
## Methods

src/content/docs/sandbox/configuration/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Configure your Sandbox SDK deployment with Wrangler, customize container images,
4242
href="/sandbox/configuration/sandbox-options/"
4343
icon="setting"
4444
>
45-
Configure sandbox behavior with options like keepAlive for long-running processes.
45+
Configure sandbox behavior with options like `keepAlive` for long-running processes.
4646
</LinkTitleCard>
4747

4848
</CardGrid>

src/content/docs/sandbox/configuration/sandbox-options.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const sandbox = getSandbox(binding, sandboxId, options?: SandboxOptions);
2525
Keep the container alive indefinitely by preventing automatic shutdown. When `true`, the container will never auto-timeout and must be explicitly destroyed using `destroy()`.
2626

2727
<TypeScriptExample>
28-
```
28+
```ts
2929
// For long-running processes that need the container to stay alive
3030
const sandbox = getSandbox(env.Sandbox, 'user-123', {
3131
keepAlive: true
@@ -44,7 +44,7 @@ try {
4444
</TypeScriptExample>
4545

4646
:::caution[Resource management with keepAlive]
47-
When `keepAlive: true` is set, containers will not automatically timeout and must be explicitly destroyed using `destroy()` to prevent containers running indefinitely and counting toward your account limits.
47+
When `keepAlive: true` is set, containers will not automatically timeout. They must be explicitly destroyed using `destroy()` to prevent containers running indefinitely and counting toward your account limits.
4848
:::
4949

5050
## When to use keepAlive
@@ -60,6 +60,6 @@ By default, containers automatically shut down after 10 minutes of inactivity. T
6060

6161
## Related resources
6262

63-
- [Background processes guide](/sandbox/guides/background-processes/) - Using keepAlive with long-running processes
63+
- [Background processes guide](/sandbox/guides/background-processes/) - Using `keepAlive` with long-running processes
6464
- [Sessions API reference](/sandbox/api/sessions/) - Container lifecycle management
6565
- [Sandboxes concept](/sandbox/concepts/sandboxes/) - Understanding sandbox lifecycle

src/content/docs/sandbox/guides/background-processes.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ console.log('All services running');
164164
By default, containers automatically shut down after 10 minutes of inactivity. For long-running processes that may have idle periods (like CI/CD pipelines, batch jobs, or monitoring tasks), use the [`keepAlive` option](/sandbox/configuration/sandbox-options/#keepalive):
165165

166166
<TypeScriptExample>
167-
```
167+
```ts
168168
import { getSandbox, parseSSEStream, type LogEvent } from '@cloudflare/sandbox';
169169

170170
export default {
@@ -209,7 +209,7 @@ When using `keepAlive: true`, containers will not automatically timeout. You **m
209209
- **Clean up** - Always stop processes when done
210210
- **Handle failures** - Monitor logs for errors and restart if needed
211211
- **Use try/finally** - Ensure cleanup happens even on errors
212-
- **Use keepAlive for long-running tasks** - Prevent container shutdown during processes with idle periods
212+
- **Use `keepAlive` for long-running tasks** - Prevent container shutdown during processes with idle periods
213213

214214
## Troubleshooting
215215

@@ -244,7 +244,7 @@ const server = await sandbox.startProcess('node server.js');
244244
## Related resources
245245

246246
- [Commands API reference](/sandbox/api/commands/) - Complete process management API
247-
- [Sandbox options configuration](/sandbox/configuration/sandbox-options/) - Configure keepAlive and other options
247+
- [Sandbox options configuration](/sandbox/configuration/sandbox-options/) - Configure `keepAlive` and other options
248248
- [Sessions API reference](/sandbox/api/sessions/) - Container lifecycle management
249249
- [Execute commands guide](/sandbox/guides/execute-commands/) - One-time command execution
250250
- [Expose services guide](/sandbox/guides/expose-services/) - Make processes accessible

0 commit comments

Comments
 (0)