Class: Gitlab::Database::PostgresAutovacuumActivity
- Inherits:
-
SharedModel
- Object
- ActiveRecord::Base
- SharedModel
- Gitlab::Database::PostgresAutovacuumActivity
show all
- Defined in:
- lib/gitlab/database/postgres_autovacuum_activity.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from SharedModel
connection, #connection_db_config, connection_pool, using_connection
Class Method Details
.for_tables(tables) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/gitlab/database/postgres_autovacuum_activity.rb', line 11
def self.for_tables(tables)
Gitlab::Database::LoadBalancing::Session.current.use_primary do
where('schema = current_schema()').where(table: tables).to_a
end
end
|
Instance Method Details
#to_s ⇒ Object
20
21
22
|
# File 'lib/gitlab/database/postgres_autovacuum_activity.rb', line 20
def to_s
"table #{table_identifier} (started: #{vacuum_start})"
end
|