Skip to content

Commit

Permalink
Use REDIS_URL as a configuration option
Browse files Browse the repository at this point in the history
This is shorter in the config, but it also prepares for a connection
using a different mechanism. For example, a remote Redis or using a unix
socket.
  • Loading branch information
ekohl committed Jul 19, 2021
1 parent c576955 commit 5d482cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
.with_content(%r{ALLOWED_IMPORT_PATHS = \["/var/lib/pulp/sync_imports"\]})
.with_content(%r{ALLOWED_CONTENT_CHECKSUMS = \["sha224", "sha256", "sha384", "sha512"\]})
.with_content(%r{\s'level': 'INFO',})
.with_content(%r{REDIS_URL = "redis://localhost:6379/8"})
.with_content(%r{CACHE_ENABLED = False})
.without_content(%r{sslmode})
is_expected.to contain_file('/etc/pulp')
Expand Down
4 changes: 1 addition & 3 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ DATABASES = {
<% end -%>
},
}
REDIS_HOST = "localhost"
REDIS_PORT = "<%= scope['redis::port'] %>"
REDIS_DB = <%= scope['pulpcore::redis_db'] %>
REDIS_URL = "redis://localhost:<%= scope['redis::port'] %>/<%= scope['pulpcore::redis_db'] %>"

USE_NEW_WORKER_TYPE = <%= scope['pulpcore::use_rq_tasking_system'] ? "False" : "True" %>

Expand Down

0 comments on commit 5d482cb

Please sign in to comment.