Skip to content

Commit

Permalink
Add time_started information to server_status
Browse files Browse the repository at this point in the history
  • Loading branch information
lbguilherme committed Mar 2, 2020
1 parent cb614d6 commit 757ec75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/storage/manager.cr
Expand Up @@ -8,6 +8,7 @@ module Storage
property table_by_id = {} of UUID => Table
property kv : KeyValueStore
property lock = Mutex.new
getter start_time = Time.utc

class Database
property info : KeyValueStore::DatabaseInfo
Expand Down
6 changes: 3 additions & 3 deletions src/storage/table/virtual_server_status_table.cr
Expand Up @@ -13,9 +13,9 @@ module Storage
"process" => {
"argv" => ARGV,
"pid" => Process.pid,
"cache_size_mb" => 0,
"cache_size_mb" => 1024,
"version" => "dev",
# "time_started" => Time.now,
"time_started" => @manager.start_time,

},
"network" => {
Expand All @@ -25,7 +25,7 @@ module Storage
"reql_port" => 0,
"connected_to" => {} of String => String,
"hostname" => System.hostname,
# "time_connected" => Time.now,
"time_connected" => @manager.start_time,
},
}).hash_value
end
Expand Down

0 comments on commit 757ec75

Please sign in to comment.