Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6d785aba
Commit
6d785aba
authored
Aug 11, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename resque_url to redis_url_string
parent
c0b14689
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
config/initializers/7_cache_settings.rb
config/initializers/7_cache_settings.rb
+7
-7
No files found.
config/initializers/7_cache_settings.rb
View file @
6d785aba
redis_config_file
=
Rails
.
root
.
join
(
'config'
,
'resque.yml'
)
redis_config_file
=
Rails
.
root
.
join
(
'config'
,
'resque.yml'
)
re
sque_url
=
if
File
.
exists?
(
redis_config_file
)
re
dis_url_string
=
if
File
.
exists?
(
redis_config_file
)
YAML
.
load_file
(
redis_config_file
)[
Rails
.
env
]
YAML
.
load_file
(
redis_config_file
)[
Rails
.
env
]
else
else
"redis://localhost:6379"
"redis://localhost:6379"
end
end
# Redis::Store does not handle Unix sockets well, so let's do it for them
# Redis::Store does not handle Unix sockets well, so let's do it for them
redis_config_hash
=
Redis
::
Store
::
Factory
.
extract_host_options_from_uri
(
re
sque_url
)
redis_config_hash
=
Redis
::
Store
::
Factory
.
extract_host_options_from_uri
(
re
dis_url_string
)
redis_uri
=
URI
.
parse
(
re
sque_url
)
redis_uri
=
URI
.
parse
(
re
dis_url_string
)
if
redis_uri
.
scheme
==
'unix'
if
redis_uri
.
scheme
==
'unix'
redis_config_hash
[
:path
]
=
redis_uri
.
path
redis_config_hash
[
:path
]
=
redis_uri
.
path
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment