Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no option to pass the redis client into goflow struct #80

Open
AswathyAshokan opened this issue Jul 27, 2023 · 1 comment
Open

Comments

@AswathyAshokan
Copy link

When initializing GoFlow with all the necessary configurations, I encountered an issue with passing the Redis client. In the GoFlow struct, there's only an option to provide the RedisClient:

fs := &goflow.FlowService{
RedisURL: redisUrl,
WorkerConcurrency: 5,
}
However, when attempting to include SSL configuration in the Redis URL, I encountered the following error message:

failed to initiate connection, error dial tcp: address .too many colons in address

The sample Redis URL used was: "rediss://" + options.Username + ":" + options.Password + "@" + options.Addr + "/0?ssl_cert_reqs=None"

Further investigation is required to resolve this problem and successfully pass the SSL configuration to the go flow during initialization.

@Runaho
Copy link

Runaho commented Feb 28, 2024

It's seams when you use go get gets v0.1.4 but they fixed this issue on master v0.1.5
I fixed with removing on go.mod file and re get with @master tag.
Also you must change configuration code you can see below.

go get github.com/s8sg/goflow@master
	fs := &goflow.FlowService{
		Port:              8080,
		RedisURL:          "localhost:6379",
		RedisPassword:     "redis",
		OpenTraceUrl:      "localhost:5775",
		WorkerConcurrency: 5,
		EnableMonitoring:  true,
		DebugEnabled:      true,
	}

I also highly recommend adding if err to .Register and .Start methods.

	if err := fs.Register("myflow", DefineWorkFlow); err != nil {
		fmt.Println("Error registering flow", err)
	}

	if err := fs.Start(); err != nil {
		fmt.Println("Error starting flow service", err)
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants