From b80cba1d1fc9fa9163eed103c178216e68ea1caf Mon Sep 17 00:00:00 2001 From: Kumi Date: Wed, 13 Nov 2024 16:20:51 +0100 Subject: [PATCH] fix: standardize log messages in update functions Updated the log messages within the `update_p2pool` function to use consistent, English-language messages. This improves readability and consistency across logging outputs. No functional behavior was altered. --- app/charts/synchronous.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/app/charts/synchronous.py b/app/charts/synchronous.py index 770253f..10180e6 100644 --- a/app/charts/synchronous.py +++ b/app/charts/synchronous.py @@ -822,25 +822,25 @@ def update_p2pool(): yesterday = date.today() - timedelta(1) try: p2pool_stat = P2Pool.objects.filter(mini=False).get(date=today) - print("achou p2pool de hoje") + print("Found P2Pool of today") if p2pool_stat.percentage > 0: - print("porcentagem > 0") + print("Percentage > 0") update = False else: - print("porcentagem < 0") + print("Percentage < 0") p2pool_stat.delete() try: coin = Coin.objects.filter(name="xmr").get(date=yesterday) - print("achou coin de ontem") + print("Found coin of yesterday") if coin.hashrate > 0: update = True else: update = False except Coin.DoesNotExist: - print("nao achou coin de ontem") + print("Didn't find coin of yesterday") update = False except P2Pool.DoesNotExist: - print("nao achou p2pool de hoje") + print("Didn't find P2Pool of today") try: coin = Coin.objects.filter(name="xmr").get(date=yesterday) if coin.hashrate > 0: @@ -896,27 +896,26 @@ def update_p2pool(): yesterday = date.today() - timedelta(1) try: p2pool_stat = P2Pool.objects.filter(mini=True).get(date=today) - print("achou p2pool_mini de hoje") + print("Found P2PoolMini of today") if p2pool_stat.percentage > 0: - - print("porcentagem > 0") + print("Percentage > 0") update = False else: - print("porcentagem < 0") + print("Percentage < 0") p2pool_stat.delete() try: coin = Coin.objects.filter(name="xmr").get(date=yesterday) - print("achou coin de ontem") + print("Found coin of yesterday") if coin.hashrate > 0: update = True else: update = False except Coin.DoesNotExist: - print("nao achou coin de ontem") + print("Didn't find coin of yesterday") update = False except P2Pool.DoesNotExist: - print("nao achou p2pool_mini de hoje") + print("Didn't find P2PoolMini of today") try: coin = Coin.objects.filter(name="xmr").get(date=yesterday) if coin.hashrate > 0: