Skip to content

Commit e74630a

Browse files
Apply suggestions from code review
Co-authored-by: Rebecca Tamachiro <[email protected]>
1 parent 6a6b62c commit e74630a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/content/docs/learning-paths/workflows-course/series/workflows-1.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
1515

1616
Cloudflare Workflows provides durable execution capabilities, allowing developers to create reliable, repeatable workflows that run in the background. Workflows are designed to resume execution even if the underlying compute fails, ensuring that tasks complete eventually. They are built on top of Cloudflare Workers and handle scaling and provisioning automatically.
1717

18-
Workflows are triggered by events, such as Event Notifications consumed from a Queue, HTTP requests, another Worker, or even scheduled timers. Individual steps within a Workflow are designed as retriable units of work. The state is persisted between steps, allowing workflows to resume from the last successful step after failures. Workflows automatically emit metrics for each step, aiding in debugging and observability.
18+
Workflows are triggered by events, such as Event Notifications consumed from a Queue, HTTP requests, another Worker, or even scheduled timers. Individual steps within a Workflow are designed as retriable units of work. The state is persisted between steps, allowing workflows to resume from the last successful step after failures. Workflows automatically generate metrics for each step, aiding in debugging and observability.
1919

2020
<Card>
2121
<Stream
@@ -25,7 +25,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
2525
showMoreVideos={false}
2626
chapters={{
2727
"Background": "0s",
28-
"Workflows Introduction": "47s",
28+
"Workflows Introduction": "45s",
2929
"Punderful, an app using all of the Cloudflare primitives": "1m10s",
3030
"Vectorize": "2m35s",
3131
"Workflow code in Action": "3m0s",
@@ -126,7 +126,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
126126

127127
[See here](https://github.com/craigsdennis/punderful-workflows/blob/7cec7f4bd7d6b17085cb6d6cb3e56b6a4b5b7c9d/src/workflows/publish.ts#L104)
128128

129-
This step updates the `status` column in the D1 database to 'published' for the corresponding pun ID. Once this step is complete, the pun is considered fully processed and ready to be displayed on the homepage.
129+
This step updates the `status` column in the D1 database to "published" for the corresponding pun ID. Once this step is complete, the pun is considered fully processed and ready to be displayed on the homepage.
130130

131131
#### Workflow Bindings
132132

@@ -140,7 +140,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
140140

141141
Vectorize is a vector database used in this application to enable semantic search for puns. It stores the vector embeddings created by Workers AI. The search functionality queries this Vectorize index to find puns similar in meaning to the user's query.
142142

143-
The homepage displays recently published puns (status 'published'). The detail page for a specific pun displays "Similar Puns", which are found by querying Vectorize with the embedding of the current pun.
143+
The homepage displays recently published puns (status "published"). The detail page for a specific pun displays "Similar Puns", which are found by querying Vectorize with the embedding of the current pun.
144144

145145
### Scalability
146146

src/content/docs/learning-paths/workflows-course/series/workflows-2.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
7171
npx wrangler workflows list
7272
```
7373

74-
To list the instances of a specific workflow (e.g., the `publish` workflow):
74+
To list the instances of a specific workflow (for example, the `publish` workflow):
7575

7676
```bash
7777
npx wrangler workflows instances list publish

src/content/docs/learning-paths/workflows-course/series/workflows-3.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
5252

5353
[See here](https://github.com/craigsdennis/punderful-workflows/blob/main/src/index.tsx#L237)
5454

55-
This function is called when a user interacts with a pun (e.g., likes it). Instead of performing the interaction logic directly, it offloads the work to a workflow.
55+
This function is called when a user interacts with a pun (for example, likes it). Instead of performing the interaction logic directly, it offloads the work to a workflow.
5656

5757
Examine the `InteractionWorkflow` definition in `src/workflows/interaction.ts`. This workflow performs tasks like checking if the user/session exists and recording the interaction in the database.
5858

@@ -89,6 +89,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
8989
Workflows can also be used for more complex, multi-step processes, including interacting with AI models. The `PuntificatorWorkflow` is an example that leverages AI to generate and evaluate new puns.
9090

9191
Examine the `PuntificatorWorkflow` definition in `src/workflows/puntificator.ts`.
92+
9293
[See here](https://github.com/craigsdennis/punderful-workflows/blob/main/src/workflows/puntificator.ts)
9394

9495
This workflow includes steps to:
@@ -102,7 +103,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
102103

103104
[See here](https://github.com/craigsdennis/punderful-workflows/blob/main/src/workflows/puntificator.ts#L135)
104105

105-
This step pauses the workflow execution for a specified duration. This is useful for waiting to see user feedback on a published pun before potentially taking further action based on its popularity.
106+
This step pauses the workflow execution for a specified duration. This is useful for waiting to consider user feedback on a published pun before potentially taking further action based on its popularity.
106107

107108
### Nested Workflows
108109

@@ -130,7 +131,7 @@ import { Render, Tabs, TabItem, Stream, Card } from "~/components";
130131
npx wrangler workflows trigger puntificator
131132
```
132133

133-
This command will queue an instance of the workflow. You will see a success message and the instance ID.
134+
This command will queue an instance of the workflow. You will receive a success message and the instance ID.
134135

135136
To describe the latest instance of a workflow:
136137

0 commit comments

Comments
 (0)