This commit is contained in:
Nicolás Sánchez 2025-08-19 20:35:44 -03:00
parent b383cde1fe
commit 2a01477a5e
1 changed files with 1 additions and 9 deletions

10
main.py
View File

@ -67,8 +67,6 @@ def seconds_to_time(total_seconds: float) -> str:
def main():
executor = ThreadPoolExecutor(max_workers=len(earners))
while True:
threads = []
#Run earners
futures = [executor.submit(e.run) for e in earners]
for future in as_completed(futures):
@ -76,12 +74,6 @@ def main():
future.result()
except Exception as e:
print(f"Error in thread - {e}")
# for item in earners:
# threads.append(Thread(target=item.run))
# for item in threads:
# item.start()
# for item in threads:
# item.join()
#Print status
subscriptions = []
@ -106,7 +98,6 @@ def main():
last_redemption_value = ""
else:
last_redemption_value = datetime.datetime.fromtimestamp(last_redemption_value).strftime('@%Y/%m/%d %H:%M:%S')
print("-"*90)
total_on_trading = sum([item.get_trading_balance() for item in earners])
total_on_earning = sum([item.get_earning_balance() for item in earners])
@ -116,6 +107,7 @@ def main():
print(f"Version {version} | Total funds: {total_funds:.2f} USDT | On earn: {total_on_earning:.2f} USDT ({total_on_earning/total_funds*100:.2f}%)")
print(f"{time_of_day} | Uptime: {seconds_to_time(time.time()-start_time)}")
print(colors.blue+"="*90+colors.white)
#Wait for next lap
time.sleep(config["lap_time"])