File tree 2 files changed +6
-6
lines changed
examples/nextjs-together-llamaindex/frontend/src/app
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const client = new Restack(
12
12
process . env . RESTACK_ENGINE_API_KEY ? connectionOptions : undefined
13
13
) ;
14
14
15
- export async function triggerWorkflow (
15
+ export async function scheduleWorkflow (
16
16
workflowName : Example [ "workflowName" ] ,
17
17
input : Example [ "input" ]
18
18
) {
Original file line number Diff line number Diff line change 2
2
3
3
import { useState } from "react" ;
4
4
import { Example , examples } from "./examplesList" ;
5
- import { triggerWorkflow } from "@/app/actions/trigger " ;
5
+ import { scheduleWorkflow } from "@/app/actions/schedule " ;
6
6
7
7
const Examples = ( ) => {
8
8
const [ loading , setLoading ] = useState ( false ) ;
@@ -12,11 +12,11 @@ const Examples = () => {
12
12
setLoading ( true ) ;
13
13
setOutput ( { } ) ;
14
14
try {
15
- const result = await triggerWorkflow ( example . workflowName , example . input ) ;
15
+ const result = await scheduleWorkflow ( example . workflowName , example . input ) ;
16
16
setOutput ( result ) ;
17
17
} 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" ) ;
20
20
} finally {
21
21
setLoading ( false ) ;
22
22
}
@@ -33,7 +33,7 @@ const Examples = () => {
33
33
onClick = { ( ) => handleButtonClick ( example ) }
34
34
disabled = { loading }
35
35
>
36
- { loading ? "Triggering ..." : "Trigger Workflow" }
36
+ { loading ? "Scheduling ..." : "Schedule Workflow" }
37
37
</ button >
38
38
</ div >
39
39
) ) }
You can’t perform that action at this time.
0 commit comments