mirror of
https://github.com/wahyd4/cadence-demo.git
synced 2026-08-08 20:24:49 +10:00
inject some variables from env
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Cadence demo
|
||||
|
||||
## How to run
|
||||
|
||||
```
|
||||
export CADENCE_URL=
|
||||
export CADENCE_DOMAIN=
|
||||
|
||||
# run the application
|
||||
|
||||
./gradlew run
|
||||
|
||||
```
|
||||
@@ -14,7 +14,9 @@ public class HelloCadence {
|
||||
private static Logger logger = Workflow.getLogger(HelloCadence.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
Worker.Factory factory = new Worker.Factory("192.168.0.249",7933, "domain");
|
||||
String cadenceUrl = System.getenv("CADENCE_URL");
|
||||
String cadenceDomain = System.getenv("CADENCE_DOMAIN");
|
||||
Worker.Factory factory = new Worker.Factory(cadenceUrl, 7933, cadenceDomain);
|
||||
Worker worker = factory.newWorker("helloWorldTaskList");
|
||||
worker.registerWorkflowImplementationTypes(HelloWorldImpl.class);
|
||||
factory.start();
|
||||
|
||||
Reference in New Issue
Block a user