byronellis commented on code in PR #5: URL: https://github.com/apache/beam-swift/pull/5#discussion_r2226578339
########## Sources/ApacheBeam/Runners/PortableRunner.swift: ########## @@ -58,18 +84,30 @@ public struct PortableRunner: PipelineRunner { }) log.info("Submitted job \(job.jobID)") var done = false + var state: PipelineCompletionState = .failed while !done { let status = try await client.getState(.with { $0.jobID = job.jobID }) log.info("Job \(job.jobID) status: \(status.state)") switch status.state { - case .stopped, .failed, .done, .cancelled: + case .done: + state = .done + done = true + case .stopped: + state = .stopped Review Comment: Good catch. ########## Sources/ApacheBeam/Internal/Date+Timestamp.swift: ########## @@ -21,12 +21,21 @@ import Foundation extension Date { /// Convenience property to extract Java-style milliseconds since the UNIX epoch var millisecondsSince1970: Int64 { - Int64((timeIntervalSince1970 * 1000.0).rounded()) + // Multiply doubles by 1000 here gives us the wrong rounging. Make sure Review Comment: Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org