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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
e6780501
Commit
e6780501
authored
Apr 05, 2019
by
Hiroyuki Sato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor project_cache_worker_key
parent
0adedbb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/workers/project_cache_worker.rb
app/workers/project_cache_worker.rb
+1
-1
spec/workers/project_cache_worker_spec.rb
spec/workers/project_cache_worker_spec.rb
+1
-1
No files found.
app/workers/project_cache_worker.rb
View file @
e6780501
...
...
@@ -42,6 +42,6 @@ class ProjectCacheWorker
end
def
project_cache_worker_key
(
project_id
,
statistics
)
([
"project_cache_worker"
,
project_id
]
+
statistics
.
sort
)
.
join
(
":"
)
[
"project_cache_worker"
,
project_id
,
*
statistics
.
sort
]
.
join
(
":"
)
end
end
spec/workers/project_cache_worker_spec.rb
View file @
e6780501
...
...
@@ -7,7 +7,7 @@ describe ProjectCacheWorker do
let
(
:worker
)
{
described_class
.
new
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:lease_key
)
{
([
"project_cache_worker"
,
project
.
id
]
+
statistics
.
sort
)
.
join
(
":"
)
}
let
(
:lease_key
)
{
[
"project_cache_worker"
,
project
.
id
,
*
statistics
.
sort
]
.
join
(
":"
)
}
let
(
:lease_timeout
)
{
ProjectCacheWorker
::
LEASE_TIMEOUT
}
let
(
:statistics
)
{
[]
}
...
...
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