cadence-worker

command module
v0.0.0-...-5876fcd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 10 Imported by: 0

README

Cadence worker sample

This is a simple example on how to write and run Cadence workflows and activities

Dependencies:

  • go 1.13+
  • docker
  • docker-compose
  1. Clone cadence:
export CADENCE_REPO_LOCATION='< your-desired-cadence-repo-location >'
git clone git@github.com:uber/cadence.git $CADENCE_REPO_LOCATION`
  1. Start cadence:
cd $CADENCE_REPO_LOCATION/docker
docker-compose up
  1. Build CLI:
cd $CADENCE_REPO_LOCATION
make bins
  1. Register domain:
$CADENCE_REPO_LOCATION/cadence --domain simple-domain domain register --global_domain false
  1. Run worker:
cd '< this-repo-location >'
go build ./...
./cadence-worker
  1. Execute branch workflow:
$CADENCE_REPO_LOCATION/cadence --domain simple-domain workflow run --tasklist simple-worker --workflow_type main.sampleBranchWorkflow --execution_timeout 5
  1. Execute parallel workflow:
$CADENCE_REPO_LOCATION/cadence --domain simple-domain workflow run --tasklist simple-worker --workflow_type main.sampleParallelWorkflow --execution_timeout 5
  1. Checkout the workflow status in Cadence UI: http://localhost:8088/domains/simple-domain/workflows?range=last-3-days&status=COMPLETED

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL