Skip to content

Commit 67d40be

Browse files
authored
chore: kickoff release
2 parents e4a0bff + b247482 commit 67d40be

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

.github/composite_actions/run_xcodebuild/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ runs:
7171
fi
7272
7373
xcodebuild -version
74-
xcodebuild build -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
74+
xcodebuild build -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
7575
shell: bash

.github/composite_actions/run_xcodebuild_test/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ runs:
100100
101101
xcode-select -p
102102
xcodebuild -version
103-
xcodebuild $action -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' ${{ inputs.other_flags }} $clonedSourcePackagesPath $derivedDataPath $coverageFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
103+
xcodebuild $action -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' ${{ inputs.other_flags }} $clonedSourcePackagesPath $derivedDataPath $coverageFlags | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
104104
shell: bash
105105

106106
- name: Generate Coverage report

AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/FaceLivenessSession.swift

+8-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ public final class FaceLivenessSession: LivenessService {
7171
}
7272

7373
public func closeSocket(with code: URLSessionWebSocketTask.CloseCode) {
74-
websocket.close(with: code)
74+
livenessServiceDispatchQueue.async {
75+
self.websocket.close(with: code)
76+
}
7577
}
7678

7779
public func initializeLivenessStream(withSessionID sessionID: String, userAgent: String = "") throws {
@@ -89,14 +91,16 @@ public final class FaceLivenessSession: LivenessService {
8991

9092
savedURLForReconnect = url
9193
let signedConnectionURL = signer.sign(url: url)
92-
websocket.open(url: signedConnectionURL)
94+
livenessServiceDispatchQueue.async {
95+
self.websocket.open(url: signedConnectionURL)
96+
}
9397
}
9498

9599
public func send<T>(
96100
_ event: LivenessEvent<T>,
97101
eventDate: @escaping () -> Date = Date.init
98102
) {
99-
livenessServiceDispatchQueue.sync {
103+
livenessServiceDispatchQueue.async {
100104
let encodedPayload = self.eventStreamEncoder.encode(
101105
payload: event.payload,
102106
headers: [
@@ -107,7 +111,7 @@ public final class FaceLivenessSession: LivenessService {
107111
)
108112

109113
let dateForSigning: Date
110-
if let serverDate = serverDate {
114+
if let serverDate = self.serverDate {
111115
dateForSigning = serverDate
112116
} else {
113117
dateForSigning = eventDate()

AmplifyPlugins/Predictions/AWSPredictionsPlugin/Liveness/Service/WebSocketSession.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ final class WebSocketSession {
1515
private var receiveMessage: ((Result<URLSessionWebSocketTask.Message, Error>) -> WebSocketMessageResult)?
1616
private var onSocketClosed: ((URLSessionWebSocketTask.CloseCode) -> Void)?
1717
private var onServerDateReceived: ((Date?) -> Void)?
18+
private let delegateQueue: OperationQueue
1819

1920
init() {
21+
self.delegateQueue = OperationQueue()
22+
self.delegateQueue.maxConcurrentOperationCount = 1
23+
self.delegateQueue.qualityOfService = .userInteractive
24+
2025
self.urlSessionWebSocketDelegate = Delegate()
26+
2127
self.session = URLSession(
2228
configuration: .default,
2329
delegate: urlSessionWebSocketDelegate,
24-
delegateQueue: .init()
30+
delegateQueue: delegateQueue
2531
)
2632
}
2733

0 commit comments

Comments
 (0)