Skip to content
Snippets Groups Projects

Use a separate table for storing push events

Merged Yorick Peterse requested to merge split-events-into-push-events into master
Compare and Show latest version
2 files
+ 3
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -5,7 +5,7 @@ class ScheduleEventMigrations < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
BUFFER_SIZE = 100
BUFFER_SIZE = 1000
disable_ddl_transaction!
@@ -18,7 +18,7 @@ class Event < ActiveRecord::Base
def up
jobs = []
Event.each_batch(of: 100) do |relation|
Event.each_batch(of: 1000) do |relation|
min, max = relation.pluck('MIN(id), MAX(id)').first
if jobs.length == BUFFER_SIZE
Loading