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
6aad7ca9
Commit
6aad7ca9
authored
Apr 20, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts in user activity
parent
fc57aab8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
31 deletions
+3
-31
app/services/users/activity_service.rb
app/services/users/activity_service.rb
+0
-4
app/workers/schedule_update_user_activity_worker.rb
app/workers/schedule_update_user_activity_worker.rb
+0
-3
app/workers/update_user_activity_worker.rb
app/workers/update_user_activity_worker.rb
+0
-3
config/sidekiq_queues.yml
config/sidekiq_queues.yml
+1
-3
db/migrate/20161007073613_create_user_activities.rb
db/migrate/20161007073613_create_user_activities.rb
+1
-7
db/post_migrate/20161128170531_drop_user_activities_table.rb
db/post_migrate/20161128170531_drop_user_activities_table.rb
+1
-8
spec/services/users/activity_service_spec.rb
spec/services/users/activity_service_spec.rb
+0
-3
No files found.
app/services/users/activity_service.rb
View file @
6aad7ca9
...
...
@@ -14,11 +14,7 @@ module Users
private
def
record_activity
<<<<<<<
HEAD
Gitlab
::
UserActivities
.
record
(
@author
.
id
)
unless
Gitlab
::
Geo
.
secondary?
=======
Gitlab
::
UserActivities
.
record
(
@author
.
id
)
>>>>>>>
ce
/
master
Rails
.
logger
.
debug
(
"Recorded activity:
#{
@activity
}
for User ID:
#{
@author
.
id
}
(username:
#{
@author
.
username
}
"
)
end
...
...
app/workers/schedule_update_user_activity_worker.rb
View file @
6aad7ca9
...
...
@@ -3,11 +3,8 @@ class ScheduleUpdateUserActivityWorker
include
CronjobQueue
def
perform
(
batch_size
=
500
)
<<<<<<<
HEAD
return
if
Gitlab
::
Geo
.
secondary?
=======
>>>>>>>
ce
/
master
Gitlab
::
UserActivities
.
new
.
each_slice
(
batch_size
)
do
|
batch
|
UpdateUserActivityWorker
.
perform_async
(
Hash
[
batch
])
end
...
...
app/workers/update_user_activity_worker.rb
View file @
6aad7ca9
...
...
@@ -3,11 +3,8 @@ class UpdateUserActivityWorker
include
DedicatedSidekiqQueue
def
perform
(
pairs
)
<<<<<<<
HEAD
return
if
Gitlab
::
Geo
.
secondary?
=======
>>>>>>>
ce
/
master
pairs
=
cast_data
(
pairs
)
ids
=
pairs
.
keys
conditions
=
'WHEN id = ? THEN ? '
*
ids
.
length
...
...
config/sidekiq_queues.yml
View file @
6aad7ca9
...
...
@@ -54,7 +54,6 @@
- [pages, 1]
- [system_hook_push, 1]
- [update_user_activity, 1]
<<<<<<< HEAD
# EE specific queues
- [geo, 1]
- [project_mirror, 1]
...
...
@@ -65,5 +64,4 @@
- [elastic_indexer, 1]
- [elastic_commit_indexer, 1]
- [export_csv, 1]
=======
>
>>>>>>
ce/master
db/migrate/20161007073613_create_user_activities.rb
View file @
6aad7ca9
class
CreateUserActivities
<
ActiveRecord
::
Migration
<<<<<<<
HEAD
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
true
...
...
@@ -24,11 +23,6 @@ class CreateUserActivities < ActiveRecord::Migration
t
.
belongs_to
:user
,
index:
{
unique:
true
},
foreign_key:
{
on_delete: :cascade
}
t
.
datetime
:last_activity_at
,
null:
false
end
=======
DOWNTIME
=
false
# This migration is a no-op. It just exists to match EE.
def
change
>>>>>>>
ce
/
master
end
end
db/post_migrate/20161128170531_drop_user_activities_table.rb
View file @
6aad7ca9
<<<<<<<
HEAD
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
=======
>>>>>>>
ce
/
master
class
DropUserActivitiesTable
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
<<<<<<<
HEAD
# When using the methods "add_concurrent_index" or "add_column_with_default"
# you must disable the use of transactions as these methods can not run in an
# existing transaction. When using "add_concurrent_index" make sure that this
...
...
@@ -34,9 +30,6 @@ class DropUserActivitiesTable < ActiveRecord::Migration
add_index
"user_activities"
,
[
"user_id"
],
name:
"index_user_activities_on_user_id"
,
unique:
true
,
using: :btree
end
=======
# This migration is a no-op. It just exists to match EE.
def
change
>>>>>>>
ce
/
master
end
end
spec/services/users/activity_service_spec.rb
View file @
6aad7ca9
...
...
@@ -38,7 +38,6 @@ describe Users::ActivityService, services: true do
end
end
end
<<<<<<<
HEAD
context
'when in Geo secondary node'
do
before
{
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
).
and_return
(
true
)
}
...
...
@@ -49,8 +48,6 @@ describe Users::ActivityService, services: true do
expect
(
last_hour_user_ids
).
to
eq
([])
end
end
=======
>>>>>>>
ce
/
master
end
def
last_hour_user_ids
...
...
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