Skip to content

Commit a10ae6a

Browse files
elithrarbruxodasilvaOxyjun
authored
Apply suggestions from code review
Co-authored-by: Diogo Ferreira <[email protected]> Co-authored-by: Jun Lee <[email protected]>
1 parent 5ae5439 commit a10ae6a

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/content/docs/workflows/build/events-and-parameters.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ When you pass your `YourEventType` to `WorkflowEvent` as a type parameter, the `
8484

8585
```ts title="src/index.ts"
8686
// Import the Workflow definition
87-
import { Workflow, WorkflowEvent, WorkflowStep } from "cloudflare:workflows"
87+
import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent} from 'cloudflare:workers';
8888

8989
export class MyWorkflow implements Workflow {
9090
// Pass your type as a type parameter to WorkflowEvent

src/content/docs/workflows/build/sleeping-and-retrying.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ If you do not provide your own retry configuration, Workflows applies the follow
6060
const defaultConfig: WorkflowStepConfig = {
6161
retries: {
6262
limit: 5,
63-
delay: 1000,
64-
backoff: "constant",
63+
delay: 10000,
64+
backoff: 'exponential',
6565
},
66-
timeout: "15 minutes",
66+
timeout: '10 minutes',
6767
};
6868
```
6969

src/content/docs/workflows/build/trigger-workflows.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To bind to a Workflow from your Workers code, you need to define a [binding](/wo
3434
```toml title="wrangler.toml"
3535
name = "workflows-tutorial"
3636
main = "src/index.ts"
37-
compatibility_date = "2024-10-15"
37+
compatibility_date = "2024-10-22"
3838

3939
[[workflows]]
4040
# The name of the Workflow
@@ -153,7 +153,7 @@ Once stopped, the Workflow instance *cannot* be resumed.
153153

154154
:::caution
155155

156-
**Known issue**: Restarting a Workflow via the `restart()` method is not currently supported ad will throw an exception (error).
156+
**Known issue**: Restarting a Workflow via the `restart()` method is not currently supported and will throw an exception (error).
157157

158158
:::
159159

src/content/docs/workflows/build/workers-api.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar:
88

99
import { MetaInfo, Type } from "~/components";
1010

11-
This guide details the Workflows API within Cloudflare Workers, including methods, types and usage examples.
11+
This guide details the Workflows API within Cloudflare Workers, including methods, types, and usage examples.
1212

1313
## WorkflowEntrypoint
1414

@@ -101,7 +101,7 @@ Workflows currently requires you to bind to a Workflow via `wrangler.toml` and d
101101

102102
:::
103103

104-
Workflows exposes a API directly to your Workers scripts via the [bindings](/workers/runtime-apis/bindings/#what-is-a-binding) concept. Bindings allow you to securely call a Workflow without having to manage API keys or clients.
104+
Workflows exposes an API directly to your Workers scripts via the [bindings](/workers/runtime-apis/bindings/#what-is-a-binding) concept. Bindings allow you to securely call a Workflow without having to manage API keys or clients.
105105

106106
You can bind to a Workflow by defining a `[[workflows]]` binding within your `wrangler.toml` configuration.
107107

@@ -133,7 +133,7 @@ Ensure you have `@cloudflare/workers-types` version `4.20241022.0` or later inst
133133

134134
:::
135135

136-
The `Workflow` type provides methods that allow you to create, inspect the status and manage running Workflow instances from within a Worker script.
136+
The `Workflow` type provides methods that allow you to create, inspect the status, and manage running Workflow instances from within a Worker script.
137137

138138
```ts
139139
interface Env {
@@ -230,7 +230,7 @@ Return the id of a Workflow.
230230

231231
### status
232232

233-
Pause a running Workflow instance.
233+
Return the status of a running Workflow instance.
234234

235235
* <code>status(): Promise&lt;void&gt;</code>
236236

src/content/docs/workflows/get-started/cli-quick-start.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ You can edit this Workflow by adding (or removing) additional `step` calls, chan
147147

148148
## 2. Deploy a Workflow
149149

150-
Workflows are deployed via [`wrangler`](/workers/wrangler/install-and-update/), which is installed when you first ran `npm create cloudflare`, above. Workflows are Worker scripts, and are deployed the same way:
150+
Workflows are deployed via [`wrangler`](/workers/wrangler/install-and-update/), which is installed when you first ran `npm create cloudflare` above. Workflows are Worker scripts, and are deployed the same way:
151151

152152
```sh
153153
npx wrangler@latest deploy
@@ -195,7 +195,7 @@ For example, the following Worker will fetch the status of an existing Workflow
195195

196196
```ts title="src/index.ts"
197197
// Import the Workflow definition
198-
import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from "cloudflare:workflows"
198+
import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent} from 'cloudflare:workers';
199199

200200
interface Env {
201201
// Matches the binding definition in your wrangler.toml

src/content/docs/workflows/observability/metrics-analytics.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Metrics can be queried (and are retained) for the past 31 days.
2525
The `workflowsAdaptiveGroups` dataset provides the following dimensions for filtering and grouping query results:
2626

2727
* `workflowName` - Workflow name - e.g. `my-workflow`
28-
* `instanceId` - Instance ID.
28+
* `instanceId` - Instance ID
2929
* `stepName` - Step name
3030
* `eventType` - Event type (see [event types](#event-types))
3131
* `stepCount` - Step number within a given instance
32-
* `date` - The date when trigger was triggered
32+
* `date` - The date when the Workflow was triggered
3333
* `datetimeFifteenMinutes` - The date and time truncated to fifteen minutes
3434
* `datetimeFiveMinutes` - The date and time truncated to five minutes
3535
* `datetimeHour` - The date and time truncated to the hour

src/content/docs/workflows/workflows-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
pcx_content_type: navigation
33
title: Workflows REST API
4-
external_link: /api/operations/cloudflare-d1-create-database
4+
external_link: /api/paths/accounts-account_id--workflows/get
55
sidebar:
66
order: 10
77

0 commit comments

Comments
 (0)