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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
20643798
Commit
20643798
authored
Jul 26, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Redis SharedState instead of Cache
parent
761c545d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ee/lib/gitlab/geo/log_cursor/event_gap_tracking.rb
ee/lib/gitlab/geo/log_cursor/event_gap_tracking.rb
+2
-2
ee/spec/lib/gitlab/geo/log_cursor/event_gap_tracking_spec.rb
ee/spec/lib/gitlab/geo/log_cursor/event_gap_tracking_spec.rb
+1
-1
No files found.
ee/lib/gitlab/geo/log_cursor/event_gap_tracking.rb
View file @
20643798
...
...
@@ -7,7 +7,7 @@ module Gitlab
attr_reader
:log_level
attr_accessor
:previous_id
GEO_LOG_CURSOR_GAPS
=
"Gitlab::Geo::LogCursor::Gaps"
.
freeze
GEO_LOG_CURSOR_GAPS
=
'geo:log_cursor:gaps'
.
freeze
GAP_GRACE_PERIOD
=
10
.
minutes
GAP_OUTDATED_PERIOD
=
1
.
hour
...
...
@@ -68,7 +68,7 @@ module Gitlab
end
def
with_redis
::
Gitlab
::
Redis
::
Cach
e
.
with
{
|
redis
|
yield
redis
}
::
Gitlab
::
Redis
::
SharedStat
e
.
with
{
|
redis
|
yield
redis
}
end
def
grace_timestamp
...
...
ee/spec/lib/gitlab/geo/log_cursor/event_gap_tracking_spec.rb
View file @
20643798
...
...
@@ -137,7 +137,7 @@ describe Gitlab::Geo::LogCursor::EventGapTracking, :clean_gitlab_redis_cache do
end
def
read_gaps
::
Gitlab
::
Redis
::
Cach
e
.
with
do
|
redis
|
::
Gitlab
::
Redis
::
SharedStat
e
.
with
do
|
redis
|
redis
.
zrangebyscore
(
described_class
::
GEO_LOG_CURSOR_GAPS
,
'-inf'
,
'+inf'
,
with_scores:
true
)
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