kevhen / CryptoCrawler

1 stars 2 forks source link

[Dashboard] Wrong API calls from "Random Tweets" #49

Open dynobo opened 6 years ago

dynobo commented 6 years ago

Hey @kevhen,

"Random Tweets" isn't working as expected. I only set "iota" and a given time range, but did only get results for bitcoins. The Log reveals, there are strange calls being made (also look at the date):

crypto-api-wrapper_1     | INFO - 01/29/2018 22:36:11: 172.18.0.7 - - [29/Jan/2018 22:36:11] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 22:36:16: 172.18.0.7 - - [29/Jan/2018 22:36:16] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 22:36:22: 172.18.0.7 - - [29/Jan/2018 22:36:22] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 22:36:32: 172.18.0.7 - - [29/Jan/2018 22:36:32] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 22:36:37: 172.18.0.7 - - [29/Jan/2018 22:36:37] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 23:04:17: 172.18.0.7 - - [29/Jan/2018 23:04:17] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 23:05:06: 172.18.0.7 - - [29/Jan/2018 23:05:06] "GET /tweets?topics=bitcoin%2Cethereum%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 23:11:19: 172.18.0.7 - - [29/Jan/2018 23:11:19] "GET /tweets?topics=bitcoin%2Ciota&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -
crypto-api-wrapper_1     | INFO - 01/29/2018 23:11:28: 172.18.0.7 - - [29/Jan/2018 23:11:28] "GET /tweets?topics=bitcoin&amount=5&from=0&to=999999999999 HTTP/1.1" 200 -

It might have to do with https://github.com/kevhen/CryptoCrawler/blob/7362ff572dd1b095521abdc5cf91c259d63a3b8f/dash/dashboard.py#L541-L556

Dash sets every input variable as parameter, no matter if it had changed or not, and the contents are somehow "arbitrary". Just do a: print('\n'.join([topic_values, n_clicks, rd_tweets, rd_senti, rd_stock])) right at the beginning of returnUpdatedTweetbox(), click around in different charts & checkboxes, and you'll see what I mean.

kevhen commented 6 years ago

i can not reproduce this with the currently deployed version. with the newly displayed color and collection name for each tweet we can easily see which collection they come from.

i may have fixed the bug already while implementing the last parts of the api today. lets check this later in our call.