Skip to content

Commit

Permalink
chore: add logs for ExpiringActivity WPB-9221 (#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterinaWire authored Jul 1, 2024
1 parent 1db7b91 commit cf4b3e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ extension EventDecoder {
var index = startIndex
for event in events {
try Task.checkCancellation()
if DeveloperFlag.debugDuplicateObjects.isOn {
if DeveloperFlag.decryptAndStoreEventsSleep.isOn {
try await Task.sleep(nanoseconds: 1_000_000_000)
}
await decryptedEvents += self.decryptAndStoreEvent(event: event, at: index, publicKeys: publicKeys, proteusService: proteusService)
Expand Down
3 changes: 2 additions & 1 deletion wire-ios-system/Source/ExpiringActivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ actor ExpiringActivityManager {
let semaphore = DispatchSemaphore(value: 0)
Task {
do {
WireLogger.backgroundActivity.debug("Start of activity: \(reason)")
try await self.startWork(block: block, semaphore: semaphore).value
WireLogger.backgroundActivity.debug("Expiring activity completed: \(reason)")
continuation.resume()
} catch {
WireLogger.backgroundActivity.debug("Expiring activity ended with an error: \(error)")
WireLogger.backgroundActivity.warn("Expiring activity ended with an error: \(error)")
continuation.resume(throwing: error)
}

Expand Down

0 comments on commit cf4b3e1

Please sign in to comment.