Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
dashboardv3
inventory-provider
Merge requests
!11
Added redis auth credentials to inventory config schema and updated _get_redis wrapper.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added redis auth credentials to inventory config schema and updated _get_redis wrapper.
feature/DBOARD3-747
into
develop
Overview
0
Commits
2
Pipelines
0
Changes
3
Merged
Neda Moeini
requested to merge
feature/DBOARD3-747
into
develop
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Compare
develop
version 1
fdd123bc
1 year ago
develop (base)
and
latest version
latest version
4b7f3c8c
2 commits,
1 year ago
version 1
fdd123bc
1 commit,
1 year ago
3 files
+
76
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
inventory_provider/tasks/common.py
+
12
−
8
Options
@@ -178,23 +178,27 @@ def _get_redis(config, dbid=None):
}
if
'
sentinel
'
in
config
:
kwargs
[
'
socket_timeout
'
]
=
config
[
'
sentinel
'
].
get
(
'
sentinel_socket_timeout
'
,
DEFAULT_SENTINEL_SOCKET_TIMEOUT
)
sentinel_kwargs
=
{
'
password
'
:
config
[
'
sentinel
'
].
get
(
'
password
'
),
'
socket_timeout
'
:
config
[
'
sentinel
'
].
get
(
'
redis_socket_timeout
'
,
DEFAULT_REDIS_SENTINEL_TIMEOUT
),
}
sentinel
=
redis
.
sentinel
.
Sentinel
([(
config
[
'
sentinel
'
][
'
hostname
'
],
config
[
'
sentinel
'
][
'
port
'
])],
**
kwargs
)
return
sentinel
.
master_for
(
config
[
'
sentinel
'
][
'
name
'
],
socket_timeout
=
config
[
'
sentinel
'
].
get
(
'
redis_socket_timeout
'
,
DEFAULT_REDIS_SENTINEL_TIMEOUT
))
config
[
'
sentinel
'
][
'
name
'
],
**
sentinel_kwargs
)
else
:
kwargs
[
'
socket_timeout
'
]
=
config
[
'
redis
'
].
get
(
'
socket_timeout
'
,
DEFAULT_REDIS_SENTINEL_TIMEOUT
)
redis_kwargs
=
{
'
password
'
:
config
[
'
redis
'
].
get
(
'
password
'
),
'
socket_timeout
'
:
config
[
'
redis
'
].
get
(
'
socket_timeout
'
,
DEFAULT_REDIS_SENTINEL_TIMEOUT
),
}
return
redis
.
StrictRedis
(
host
=
config
[
'
redis
'
][
'
hostname
'
],
port
=
config
[
'
redis
'
][
'
port
'
],
**
kwargs
)
**
redis_
kwargs
)
def
get_current_redis
(
config
):
Loading