Create metric list and log start once

This commit is contained in:
Christoph Hagen 2023-11-28 08:46:26 +01:00
parent 7f1b9a5d96
commit ab2a14e00b

View File

@ -50,13 +50,13 @@ public func configure(_ app: Application) throws {
provider = .init(observer: monitor, accessManager: config.authenticationTokens) provider = .init(observer: monitor, accessManager: config.authenticationTokens)
provider.asyncScheduler = asyncScheduler provider.asyncScheduler = asyncScheduler
provider.registerRoutes(app) provider.registerRoutes(app)
monitor.saveCurrentListOfMetricsToLogFolder()
asyncScheduler.schedule { asyncScheduler.schedule {
_ = try await status.update(.nominal) _ = try await status.update(.nominal)
await deviceManager.updateDeviceConnectionMetric() await deviceManager.updateDeviceConnectionMetric()
} }
print("[\(df.string(from: Date()))] Server started")
log("[\(df.string(from: Date()))] Server started") log("[\(df.string(from: Date()))] Server started")
// Gracefully shut down by closing potentially open socket // Gracefully shut down by closing potentially open socket