mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Merge pull request #104 from breez/savage-service-status
Update 0.2.10 & add service status page
This commit is contained in:
23
snippets/python/src/service_status.py
Normal file
23
snippets/python/src/service_status.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import breez_sdk
|
||||
|
||||
def health_check_status(sdk_services):
|
||||
try:
|
||||
# ANCHOR: health-check-status
|
||||
health_check = sdk_services.service_health_check()
|
||||
print("Current service status is: ", health_check.status)
|
||||
# ANCHOR_END: health-check-status
|
||||
except Exception as error:
|
||||
print(error)
|
||||
raise
|
||||
|
||||
def report_payment_failure(sdk_services):
|
||||
try:
|
||||
# ANCHOR: report-payment-failure
|
||||
payment_hash = "..."
|
||||
sdk_services.report_issue(
|
||||
breez_sdk.ReportIssueRequest.PAYMENT_FAILURE(
|
||||
breez_sdk.ReportPaymentFailureDetails(payment_hash)))
|
||||
# ANCHOR_END: report-payment-failure
|
||||
except Exception as error:
|
||||
print(error)
|
||||
raise
|
||||
Reference in New Issue
Block a user