update to rails 4.2.5.1, add debugging info for tracking slow queries

This commit is contained in:
r888888888
2016-02-23 16:33:43 -08:00
parent bb3eb9f980
commit 4b24a5cb7e
13 changed files with 670 additions and 646 deletions

View File

@@ -1,5 +1,5 @@
class AddIndexToArtistGroupName < ActiveRecord::Migration
def change
add_index :artists, :group_name
# add_index :artists, :group_name
end
end

View File

@@ -1,4 +1,5 @@
require 'set'
require 'timecop'
CurrentUser.ip_addr = "127.0.0.1"
Delayed::Worker.delay_jobs = false
@@ -38,11 +39,14 @@ end
if User.count == 0
puts "Creating users"
user = User.create(
:name => "admin",
:password => "password1",
:password_confirmation => "password1"
)
Timecop.travel(1.month.ago) do
user = User.create(
:name => "admin",
:password => "password1",
:password_confirmation => "password1"
)
end
0.upto(10) do |i|
User.create(
@@ -69,7 +73,7 @@ if Upload.count == 0
url = "http://ipsumimage.appspot.com/#{width}x#{height}"
tags = rand_sentence(12).scan(/[a-z]+/).join(" ")
Upload.create(:source => url, :content_type => "image/gif", :rating => "q", :tag_string => tags, :server => Socket.gethostname)
Upload.create!(:source => url, :content_type => "image/gif", :rating => "q", :tag_string => tags, :server => Socket.gethostname)
end
else
puts "Skipping uploads"

File diff suppressed because it is too large Load Diff