Class: Gitlab::Database::HealthStatus::Context
- Inherits:
-
Object
- Object
- Gitlab::Database::HealthStatus::Context
- Defined in:
- lib/gitlab/database/health_status/context.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#gitlab_schema ⇒ Object
readonly
Returns the value of attribute gitlab_schema.
-
#status_checker ⇒ Object
readonly
Returns the value of attribute status_checker.
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
Instance Method Summary collapse
-
#initialize(status_checker, connection, tables, gitlab_schema) ⇒ Context
constructor
status_checker: the caller object which checks for database health status eg: BackgroundMigration::BatchedMigration or DeferJobs::DatabaseHealthStatusChecker.
- #status_checker_info ⇒ Object
Constructor Details
#initialize(status_checker, connection, tables, gitlab_schema) ⇒ Context
status_checker: the caller object which checks for database health status
eg: BackgroundMigration::BatchedMigration or DeferJobs::DatabaseHealthStatusChecker
11 12 13 14 15 16 |
# File 'lib/gitlab/database/health_status/context.rb', line 11 def initialize(status_checker, connection, tables, gitlab_schema) @status_checker = status_checker @connection = connection @tables = tables @gitlab_schema = gitlab_schema end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
7 8 9 |
# File 'lib/gitlab/database/health_status/context.rb', line 7 def connection @connection end |
#gitlab_schema ⇒ Object (readonly)
Returns the value of attribute gitlab_schema.
7 8 9 |
# File 'lib/gitlab/database/health_status/context.rb', line 7 def gitlab_schema @gitlab_schema end |
#status_checker ⇒ Object (readonly)
Returns the value of attribute status_checker.
7 8 9 |
# File 'lib/gitlab/database/health_status/context.rb', line 7 def status_checker @status_checker end |
#tables ⇒ Object (readonly)
Returns the value of attribute tables.
7 8 9 |
# File 'lib/gitlab/database/health_status/context.rb', line 7 def tables @tables end |
Instance Method Details
#status_checker_info ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/gitlab/database/health_status/context.rb', line 18 def status_checker_info { status_checker_id: status_checker.id, status_checker_type: status_checker.class.name, job_class_name: status_checker.job_class_name } end |