[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: Tip reserves check.
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: Tip reserves check. |
Date: |
Fri, 02 Jul 2021 15:15:36 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 9ec41ad Tip reserves check.
9ec41ad is described below
commit 9ec41ad1a7609cca6e5d53775b90306890c94ed8
Author: ms <ms@taler.net>
AuthorDate: Fri Jul 2 15:14:08 2021 +0200
Tip reserves check.
Christian suggests to only look at the largest tip reserve.
---
buildbot/check_tip_reserve.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/buildbot/check_tip_reserve.py b/buildbot/check_tip_reserve.py
index 68b87b0..ef821fa 100755
--- a/buildbot/check_tip_reserve.py
+++ b/buildbot/check_tip_reserve.py
@@ -31,7 +31,6 @@ resp = requests.get(
headers = {"Authorization": f"Bearer {TALER_ENV_FRONTENDS_APITOKEN}"}
)
-# Instance exists, we PATCH the auth just in case it changed.
if resp.status_code != 200:
print("merchant backend failed at providing a list of tip reserves!")
exit(1)
@@ -41,18 +40,15 @@ if len(reserves) == 0:
print("merchant backend has NO tip reserves active!")
exit(1)
-total_amount = Amount.parse(reserves[0].get("committed_amount"))
+max_amount = Amount.parse(reserves[0].get("committed_amount"))
for item in reserves[1:]:
item_amount = Amount.parse(item.get("committed_amount"))
- total_amount += item_amount
-
-if total_amount.is_zero():
- print("tip money reached zero")
- exit(1)
+ if item_amount > max_amount:
+ max_amount = item_amount
# FIXME, eventually, just check the largest amount left through
# all the reserves.
-print(f"Tip money is available: {total_amount}")
+print(f"Largest tip reserve: {max_amount}")
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
print(f"=========================================")
print(f"FULL DUMP FROM THE BACKEND:\n{resp.text}")
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: Tip reserves check.,
gnunet <=