Skip to content

Commit

Permalink
Refresh the ledger pool (#90)
Browse files Browse the repository at this point in the history
Signed-off-by: conanoc <conanoc@gmail.com>
  • Loading branch information
conanoc authored Mar 11, 2024
1 parent 44b8a5e commit 16c27db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/hyperledger/aries-uniffi-wrappers",
"state" : {
"revision" : "f335e392d6c5b8bd4dfa65746f214b80cdc60551",
"version" : "0.2.0"
"revision" : "01def706b44a4095032cd42f0480a5bdfb809961",
"version" : "0.2.1"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
targets: ["AriesFramework"])
],
dependencies: [
.package(url: "https://github.com/hyperledger/aries-uniffi-wrappers", exact: "0.2.0"),
.package(url: "https://github.com/hyperledger/aries-uniffi-wrappers", exact: "0.2.1"),
.package(url: "https://github.com/bhsw/concurrent-ws", exact: "0.5.0"),
.package(url: "https://github.com/JohnSundell/CollectionConcurrencyKit", exact: "0.2.0"),
.package(url: "https://github.com/keefertaylor/Base58Swift", exact: "2.1.7"),
Expand Down
7 changes: 5 additions & 2 deletions Sources/AriesFramework/ledger/LedgerService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ public class LedgerService {
throw AriesFrameworkError.frameworkError("Pool opening failed: \(error)")
}

let status = try await self.pool!.getStatus()
logger.debug("Pool status: \(status)")
Task {
try await self.pool?.refresh()
let status = try await self.pool?.getStatus()
logger.debug("Pool status: \(status.debugDescription)")
}
}

public func registerSchema(did: DidInfo, schemaTemplate: SchemaTemplate) async throws -> String {
Expand Down

0 comments on commit 16c27db

Please sign in to comment.