func update()

in Sources/XCMetricsBackendLib/UploadMetrics/Repository/PostgreSQLJobLogRepository.swift [34:46]


    func update(_ id: String, status: JobLogStatus, error: Error?,
                using eventLoop: EventLoop) -> EventLoopFuture<Void> {
        return JobLogEntry.find(id, on: db)
            .flatMap {  entry -> EventLoopFuture<Void> in
                if let entry = entry {
                    return update(entry, status: status, error: error, using: eventLoop)
                } else {
                    // In case the `Job` was not a `ProcessMetricsJob` we don't do anything
                    // This could happen in the future if we add more `Job` types
                    return eventLoop.future()
                }
            }
    }