Skip to content

Commit

Permalink
fix: Fix connection issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmichaelchen committed Nov 17, 2023
1 parent bdc6e6c commit 5a85cad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ curl -v http://localhost:8081/temporal.v1beta1.TemporalService/CreateOnboardingW
-H "Content-Type: application/json" \
-d '{"license": {"name": "L1"}, "org": {"name": "Org1"}, "profile": {"name": "Kevin Chen"}}'

http POST \
pkgx http POST \
http://localhost:8081/temporal.v1beta1.TemporalService/CreateOnboardingWorkflow \
license:='{"name": "L1"}' \
org:='{"name": "Org1"}' \
Expand Down
6 changes: 3 additions & 3 deletions cmd/saga/worker/app/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewController(

// NewLicenseClient - Returns a new Connect client for the License service.
func NewLicenseClient() licensev1beta1connect.LicenseServiceClient {
addr := fmt.Sprintf("localhost:%d", servicePortLicense)
addr := fmt.Sprintf("http://localhost:%d", servicePortLicense)

return licensev1beta1connect.NewLicenseServiceClient(
http.DefaultClient,
Expand All @@ -61,7 +61,7 @@ func NewLicenseClient() licensev1beta1connect.LicenseServiceClient {

// NewOrgClient - Returns a new Connect client for the Org service.
func NewOrgClient() orgv1beta1connect.OrgServiceClient {
addr := fmt.Sprintf("localhost:%d", servicePortOrg)
addr := fmt.Sprintf("http://localhost:%d", servicePortOrg)

return orgv1beta1connect.NewOrgServiceClient(
http.DefaultClient,
Expand All @@ -72,7 +72,7 @@ func NewOrgClient() orgv1beta1connect.OrgServiceClient {

// NewProfileClient - Returns a new Connect client for the Profile service.
func NewProfileClient() profilev1beta1connect.ProfileServiceClient {
addr := fmt.Sprintf("localhost:%d", servicePortProfile)
addr := fmt.Sprintf("http://localhost:%d", servicePortProfile)

return profilev1beta1connect.NewProfileServiceClient(
http.DefaultClient,
Expand Down
2 changes: 1 addition & 1 deletion pkg/fxmod/otel/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Config struct {

// TraceConfig - Config for OTel tracing.
type TraceConfig struct {
URL string `env:"URL,default=http://localhost:14268/api/traces"`
URL string `env:"URL,default=localhost:14268/api/traces"`
Env string `env:"URL,default=local"`
}

Expand Down
5 changes: 3 additions & 2 deletions taskfiles/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ tasks:
all:
desc: "Starts everything"
deps:
- pkgx docker-clean stop
- task: infra
- task: temporal
- task: worker
Expand All @@ -15,7 +14,9 @@ tasks:

infra:
desc: "Runs Docker Compose infra"
cmd: docker compose up -d
cmds:
- pkgx docker-clean stop
- docker compose up -d

temporal:
desc: "Runs Temporal dev server"
Expand Down

0 comments on commit 5a85cad

Please sign in to comment.