diff --git a/Package.swift b/Package.swift index ceaa481..499dd9b 100755 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/vapor/vapor", from: "4.0.0"), - .package(url: "https://github.com/christophhagen/Clairvoyant", from: "0.1.0"), + .package(url: "https://github.com/christophhagen/Clairvoyant", from: "0.2.0"), ], targets: [ .target(name: "App", diff --git a/Sources/App/CapServer.swift b/Sources/App/CapServer.swift index 1e025e8..9952e04 100644 --- a/Sources/App/CapServer.swift +++ b/Sources/App/CapServer.swift @@ -343,16 +343,18 @@ final class CapServer: ServerOwner { // MARK: Monitoring - private let capCountPropertyId = PropertyId(name: "caps", uniqueId: 1) + public let name = "caps" - private let imageCountPropertyId = PropertyId(name: "images", uniqueId: 2) + private let capCountPropertyId = PropertyId(owner: "caps", uniqueId: 2) - private let classifierVersionPropertyId = PropertyId(name: "classifier", uniqueId: 3) + private let imageCountPropertyId = PropertyId(owner: "caps", uniqueId: 3) + + private let classifierVersionPropertyId = PropertyId(owner: "caps", uniqueId: 4) func registerProperties(with monitor: PropertyManager) { let capCountProperty = PropertyRegistration( uniqueId: capCountPropertyId.uniqueId, - name: capCountPropertyId.name, + name: "caps", updates: .continuous, isLogged: true, allowsManualUpdate: false, @@ -363,7 +365,7 @@ final class CapServer: ServerOwner { let imageCountProperty = PropertyRegistration( uniqueId: imageCountPropertyId.uniqueId, - name: imageCountPropertyId.name, + name: "images", updates: .continuous, isLogged: true, allowsManualUpdate: false, @@ -374,7 +376,7 @@ final class CapServer: ServerOwner { let classifierVersionProperty = PropertyRegistration( uniqueId: classifierVersionPropertyId.uniqueId, - name: classifierVersionPropertyId.name, + name: "classifier", updates: .continuous, isLogged: true, allowsManualUpdate: false,