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

Able to assign customise Redis setup #509

Closed
alChaCC opened this issue May 25, 2020 · 2 comments
Closed

Able to assign customise Redis setup #509

alChaCC opened this issue May 25, 2020 · 2 comments

Comments

@alChaCC
Copy link

alChaCC commented May 25, 2020

Is your feature request related to a problem? Please describe.

I got errors shown as below:

/usr/local/bundle/gems/redis-4.1.3/lib/redis/client.rb:438:in `_parse_options': invalid uri scheme '' (ArgumentError)
	from /usr/local/bundle/gems/redis-4.1.3/lib/redis/client.rb:83:in `initialize'
	from /usr/local/bundle/gems/redis-4.1.3/lib/redis.rb:45:in `new'
	from /usr/local/bundle/gems/redis-4.1.3/lib/redis.rb:45:in `initialize'
	from /usr/local/bundle/gems/brpoplpush-redis_script-0.1.1/lib/brpoplpush/redis_script/config.rb:24:in `new'
	from /usr/local/bundle/gems/brpoplpush-redis_script-0.1.1/lib/brpoplpush/redis_script/config.rb:24:in `initialize'
	from /usr/local/bundle/gems/brpoplpush-redis_script-0.1.1/lib/brpoplpush/redis_script/dsl.rb:55:in `new'
	from /usr/local/bundle/gems/brpoplpush-redis_script-0.1.1/lib/brpoplpush/redis_script/dsl.rb:55:in `config'
	from /usr/local/bundle/gems/brpoplpush-redis_script-0.1.1/lib/brpoplpush/redis_script/dsl.rb:40:in `configure'
	from /usr/local/bundle/gems/sidekiq-unique-jobs-7.0.0.beta19/lib/sidekiq_unique_jobs/script.rb:10:in `<module:Script>'
	from /usr/local/bundle/gems/sidekiq-unique-jobs-7.0.0.beta19/lib/sidekiq_unique_jobs/script.rb:7:in `<module:SidekiqUniqueJobs>'
	from /usr/local/bundle/gems/sidekiq-unique-jobs-7.0.0.beta19/lib/sidekiq_unique_jobs/script.rb:3:in `<main>'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /usr/local/bundle/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
	from /usr/local/bundle/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	from /usr/local/bundle/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
	from /usr/local/bundle/gems/sidekiq-unique-jobs-7.0.0.beta19/lib/sidekiq_unique_jobs.rb:27:in `<main>'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /usr/local/bundle/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
	from /usr/local/bundle/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	from /usr/local/bundle/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
	from /usr/local/bundle/gems/sidekiq-unique-jobs-7.0.0.beta19/lib/sidekiq-unique-jobs.rb:3:in `<main>'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
	from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:69:in `each'
	from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:69:in `block in require'
	from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:58:in `each'
	from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:58:in `require'
	from /usr/local/lib/ruby/2.7.0/bundler.rb:174:in `require'

the main root cause is that I setup my Redis like this

image

not sure how/where to configure like that while using the gem.

So, my work around is to make sure REDIS_URL included everything.

Describe the solution you'd like

support customize Redis connection (if not implemented yet)

Describe alternatives you've considered

clear document to show how to customize connection (if it's implemented)

Additional context
nope

@mhenrixon
Copy link
Owner

Usual practice is that the REDIS_URL includes the protocol so that you end up with config.redis = { url: ENV['REDIS_URL'] }

@mhenrixon
Copy link
Owner

In #571 I go through how to simply configure Sidekiq but to be honest, that question belongs more in the Sidekiq issues. Perhaps you can find some guidance on their wiki? https://github.com/mperham/sidekiq/wiki/Using-Redis

I'll go ahead and close this issue for now. Doesn't really relate to this gem as we are just using the configuration for Sidekiq to work our magic.

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