wip
This commit is contained in:
@ -276,15 +276,15 @@ class SolanaAPI:
|
||||
if solana_ws.websocket:
|
||||
await solana_ws.close()
|
||||
await async_safe_call(self.on_bot_message,"Reconnecting...")
|
||||
if self.receive_task and not self.receive_task.cancelled():
|
||||
if receive_task and not receive_task.cancelled():
|
||||
receive_task.cancel()
|
||||
if self.process_task and not self.process_task.cancelled():
|
||||
if process_task and not process_task.cancelled():
|
||||
process_task.cancel()
|
||||
except Exception as e:
|
||||
logger.error(f"An error occurred while unsubscribing: {e}")
|
||||
finally:
|
||||
self.receive_task = None
|
||||
self.process_task = None
|
||||
receive_task = None
|
||||
process_task = None
|
||||
|
||||
await asyncio.sleep(5)
|
||||
|
||||
|
@ -304,7 +304,7 @@ def get_latest_log_file(wh:bool):
|
||||
# files = [f for f in os.listdir(log_dir) if os.path.isfile(os.path.join(log_dir, f))]
|
||||
# filter files mask log_20241005_004103_143116.json
|
||||
if wh:
|
||||
files = [f for f in os.listdir(log_dir) if os.path.isfile(os.path.join(log_dir, f)) and f.startswith('wh-')]
|
||||
files = [f for f in os.listdir(log_dir) if os.path.isfile(os.path.join(log_dir, f)) and f.startswith('wh_')]
|
||||
else:
|
||||
files = [f for f in os.listdir(log_dir) if os.path.isfile(os.path.join(log_dir, f)) and f.startswith('log_')]
|
||||
|
||||
|
Reference in New Issue
Block a user