-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2220 from internetee/optimize-verification-model-v2
decrease db load
- Loading branch information
Showing
11 changed files
with
246 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,3 +98,7 @@ group :test do | |
end | ||
|
||
gem 'aws-sdk-sesv2', '~> 1.19' | ||
|
||
# profiles | ||
gem 'pghero' | ||
gem 'pg_query', '>= 0.9.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class CreatePgheroQueryStats < ActiveRecord::Migration[6.1] | ||
def change | ||
create_table :pghero_query_stats do |t| | ||
t.text :database | ||
t.text :user | ||
t.text :query | ||
t.integer :query_hash, limit: 8 | ||
t.float :total_time | ||
t.integer :calls, limit: 8 | ||
t.timestamp :captured_at | ||
end | ||
|
||
add_index :pghero_query_stats, [:database, :captured_at] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# namespace :generate_mock do | ||
# task contacts: :environment do | ||
# 1000.times do | ||
# c = Contact.new | ||
# c.name = generate_random_string | ||
# c.email = generate_random_string + "@" + generate_random_string + ".ee" | ||
# c.registrar_id = registrar | ||
# c.street = generate_random_string | ||
# c.city = generate_random_string | ||
# c.zip = '12323' | ||
# c.country_code = 'EE' | ||
# c.phone = "+372.59813318" | ||
# c.ident_country_code = 'EE' | ||
# c.ident_type = 'priv' | ||
# c.ident = '38903110313' | ||
# c.code = generate_random_string + ":" + generate_random_string | ||
# c.save | ||
# end | ||
# end | ||
# | ||
# def generate_random_string | ||
# (0...10).map { (65 + rand(26)).chr }.join | ||
# end | ||
# | ||
# def registrar | ||
# Registrar.last.id | ||
# end | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.