File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
test_workflow/app/workflows/simpleWorkflow Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ .PHONY : build test
2+
3+ build :
4+ go mod tidy
5+ go fmt ./...
6+ go vet ./...
7+ ifneq (, $(shell which staticcheck))
8+ staticcheck ./...
9+ else
10+ @echo "Skipping 'staticcheck'... Install using (go install honnef.co/go/tools/cmd/staticcheck@latest)"
11+ endif
12+ go build ./...
13+
14+ test :
15+ ifeq (, $(shell which gotestsum))
16+ go test ./...
17+ else
18+ gotestsum
19+ endif
Original file line number Diff line number Diff line change 1+ import { serve } from "@upstash/workflow/nextjs" ;
2+
3+ export const { POST } = serve (
4+ async ( context ) => {
5+ await context . run ( "step-1" , async ( ) => {
6+ console . log ( "step-1" ) ;
7+ return "step-1-output" ;
8+ } ) ;
9+
10+ await context . run ( "step-2" , async ( ) => {
11+ console . log ( "step-2" ) ;
12+ return "step-2-output" ;
13+ } ) ;
14+
15+ await context . run ( "step-3" , ( ) => {
16+ console . log ( "step-3" ) ;
17+ return "step-3-output" ;
18+ } ) ;
19+ } , {
20+ verbose : true
21+ }
22+ ) ;
You can’t perform that action at this time.
0 commit comments