Commit 6aad7ca9 authored by Nick Thomas's avatar Nick Thomas

Resolve conflicts in user activity

parent fc57aab8
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
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
<<<<<<< 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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment