Skip to content

Commit

Permalink
changing ports
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Rocha <[email protected]>
  • Loading branch information
rochabr committed Jul 25, 2024
1 parent a6f8709 commit b1c40e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions jobs/go/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ The terminal console output should look similar to this, where:


```text
== APP - job-service == dapr client initializing for: 127.0.0.1:6281
== APP - job-service == dapr client initializing for: 127.0.0.1:6481
== APP - job-service == Registered job handler for: R2-D2
== APP - job-service == Registered job handler for: C-3PO
== APP - job-service == Registered job handler for: BB-8
== APP - job-service == Starting server on port: 6200
== APP - job-service == Starting server on port: 6400
== APP - job-service == Job scheduled: R2-D2
== APP - job-service == Job scheduled: C-3PO
== APP - job-service == 2024/07/17 18:09:59 job:{name:"C-3PO" due_time:"10s" data:{value:"{\"droid\":\"C-3PO\",\"Task\":\"Memory Wipe\"}"}}
Expand Down Expand Up @@ -93,23 +93,23 @@ dapr stop -f .
1. Open a terminal and run the `job-service` app:

```bash
dapr run --app-id job-service --app-port 6200 --dapr-grpc-port 6281 --app-protocol grpc -- go run .
dapr run --app-id job-service --app-port 6400 --dapr-grpc-port 6481 --app-protocol grpc -- go run .
```

The output should be:

```text
== APP == dapr client initializing for: 127.0.0.1:6281
== APP == dapr client initializing for: 127.0.0.1:6481
== APP == Registered job handler for: R2-D2
== APP == Registered job handler for: C-3PO
== APP == Registered job handler for: BB-8
== APP == Starting server on port: 6200
== APP == Starting server on port: 6400
```

2. On a new terminal window, run the `job-scheduler` app:

```bash
dapr run --app-id job-scheduler --app-port 6300 -- go run .
dapr run --app-id job-scheduler --app-port 6500 -- go run .
```

The output should be:
Expand Down
6 changes: 3 additions & 3 deletions jobs/go/sdk/dapr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ version: 1
apps:
- appDirPath: ./job-service/
appID: job-service
appPort: 6200
daprGRPCPort: 6281
appPort: 6400
daprGRPCPort: 6481
appProtocol: grpc
command: ["go", "run", "."]
- appDirPath: ./job-scheduler/
appID: job-scheduler
appPort: 6300
appPort: 6500
command: ["go", "run", "."]
2 changes: 1 addition & 1 deletion jobs/go/sdk/job-service/job-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func main() {

appPort := os.Getenv("APP_PORT")
if appPort == "" {
appPort = "6200"
appPort = "6400"
}

//Create new Dapr client
Expand Down

0 comments on commit b1c40e0

Please sign in to comment.