Open smuu opened 3 years ago
Looking at the logs it just stops to do anything. Not sure what happens here.
2021-10-25 02:56:32,358 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:32,901 INFO: Checking for coin announcements every 1 minute (in a separate thread) 2021-10-25 02:56:35,363 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:36,040 INFO: Checking for coin announcements every 1 minute (in a separate thread) 2021-10-25 02:56:38,368 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:39,186 INFO: Checking for coin announcements every 1 minute (in a separate thread) 2021-10-25 02:56:41,373 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:44,378 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:47,383 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:50,388 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:53,393 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating 2021-10-25 02:56:56,398 INFO: No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating
I think this is because not coin has been listed (since CHESS).
But the 10 hours before it worked. So not sure why this is the cause.
In get_last_coin() function, you need to be keep connection alive, you can try add something below:
import requests
from requests.structures import CaseInsensitiveDict
...
headers = CaseInsensitiveDict()
headers["Connection"] = "keep-alive"
headers["Keep-Alive"] = "timeout=5, max=100"
latest_announcement = requests.get(link, headers=headers)
I fell that the search_and_update thread sometimes just stops and throws no error, and the application runs without it. Anyone else observed this? If so I would propose to invest some time in improving the different threads needed to have the bot running stable. In case I find some time, I can do that, or assist with that.