fix: standardize log messages in update functions
Some checks failed
Docker / build (push) Has been cancelled

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.
This commit is contained in:
Kumi 2024-11-13 16:20:51 +01:00
parent 831867dfb1
commit b80cba1d1f
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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: