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
65b4b0cf
Commit
65b4b0cf
authored
Apr 11, 2019
by
Cindy Pallares
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo in activity lease
parent
e605d8c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/services/users/activity_service.rb
app/services/users/activity_service.rb
+1
-1
spec/services/users/activity_service_spec.rb
spec/services/users/activity_service_spec.rb
+1
-1
No files found.
app/services/users/activity_service.rb
View file @
65b4b0cf
...
@@ -30,7 +30,7 @@ module Users
...
@@ -30,7 +30,7 @@ module Users
return
if
@user
.
last_activity_on
==
today
return
if
@user
.
last_activity_on
==
today
lease
=
Gitlab
::
ExclusiveLease
.
new
(
"ac
it
vity_service:
#{
@user
.
id
}
"
,
lease
=
Gitlab
::
ExclusiveLease
.
new
(
"ac
ti
vity_service:
#{
@user
.
id
}
"
,
timeout:
LEASE_TIMEOUT
)
timeout:
LEASE_TIMEOUT
)
return
unless
lease
.
try_obtain
return
unless
lease
.
try_obtain
...
...
spec/services/users/activity_service_spec.rb
View file @
65b4b0cf
...
@@ -76,7 +76,7 @@ describe Users::ActivityService do
...
@@ -76,7 +76,7 @@ describe Users::ActivityService do
let
(
:last_activity_on
)
{
nil
}
let
(
:last_activity_on
)
{
nil
}
it
'does not update last_activity_on'
do
it
'does not update last_activity_on'
do
stub_exclusive_lease_taken
(
"ac
it
vity_service:
#{
user
.
id
}
"
,
timeout:
1
.
minute
.
to_i
)
stub_exclusive_lease_taken
(
"ac
ti
vity_service:
#{
user
.
id
}
"
,
timeout:
1
.
minute
.
to_i
)
expect
{
subject
.
execute
}.
not_to
change
(
user
,
:last_activity_on
)
expect
{
subject
.
execute
}.
not_to
change
(
user
,
:last_activity_on
)
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