Class: Timescaledb::Stats::JobStats
- Inherits:
-
Object
- Object
- Timescaledb::Stats::JobStats
- Defined in:
- lib/timescaledb/stats/job_stats.rb
Instance Method Summary collapse
-
#initialize(connection = Timescaledb.connection) ⇒ JobStats
constructor
A new instance of JobStats.
-
#to_h ⇒ Hash
The job_stats stats.
Constructor Details
#initialize(connection = Timescaledb.connection) ⇒ JobStats
Returns a new instance of JobStats.
6 7 8 |
# File 'lib/timescaledb/stats/job_stats.rb', line 6 def initialize(connection = Timescaledb.connection) @connection = connection end |
Instance Method Details
#to_h ⇒ Hash
Returns The job_stats stats.
13 14 15 |
# File 'lib/timescaledb/stats/job_stats.rb', line 13 def to_h query_first(job_stats_query).to_h.transform_values(&:to_i) end |