Skip to content

Commit b3992d9

Browse files
committed
Avoid logging slow SQL for tenant creation
1 parent 2788719 commit b3992d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/initializers/log_slow_sql_queries.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
# Skip transaction that may be blocked
4343
next if data[:sql].match?(/BEGIN|COMMIT/)
4444

45+
# Skip tenant creation (load dump)
46+
next if data[:sql][..120].include?("Dumped by pg_dump")
47+
4548
# Skip smaller durations
4649
duration = ((finish - start) * 1000).round(4)
4750
next if duration <= slow_sql_threshold

0 commit comments

Comments
 (0)