Skip to content

Commit 7c99e01

Browse files
committed
trigger->schedule
1 parent cbb8034 commit 7c99e01

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/nextjs-together-llamaindex/frontend/src/app/actions/trigger.ts renamed to examples/nextjs-together-llamaindex/frontend/src/app/actions/schedule.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const client = new Restack(
1212
process.env.RESTACK_ENGINE_API_KEY ? connectionOptions : undefined
1313
);
1414

15-
export async function triggerWorkflow(
15+
export async function scheduleWorkflow(
1616
workflowName: Example["workflowName"],
1717
input: Example["input"]
1818
) {

examples/nextjs-together-llamaindex/frontend/src/app/components/Examples.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useState } from "react";
44
import { Example, examples } from "./examplesList";
5-
import { triggerWorkflow } from "@/app/actions/trigger";
5+
import { scheduleWorkflow } from "@/app/actions/schedule";
66

77
const Examples = () => {
88
const [loading, setLoading] = useState(false);
@@ -12,11 +12,11 @@ const Examples = () => {
1212
setLoading(true);
1313
setOutput({});
1414
try {
15-
const result = await triggerWorkflow(example.workflowName, example.input);
15+
const result = await scheduleWorkflow(example.workflowName, example.input);
1616
setOutput(result);
1717
} catch (error) {
18-
console.error("Error triggering workflow:", error);
19-
setOutput("Error triggering workflow");
18+
console.error("Error scheduling workflow:", error);
19+
setOutput("Error scheduling workflow");
2020
} finally {
2121
setLoading(false);
2222
}
@@ -33,7 +33,7 @@ const Examples = () => {
3333
onClick={() => handleButtonClick(example)}
3434
disabled={loading}
3535
>
36-
{loading ? "Triggering..." : "Trigger Workflow"}
36+
{loading ? "Scheduling..." : "Schedule Workflow"}
3737
</button>
3838
</div>
3939
))}

0 commit comments

Comments
 (0)