tianhaotian / tianhaotian.github.io

0 stars 0 forks source link

8-5&8-6 Working Records #3

Open tianhaotian opened 8 years ago

tianhaotian commented 8 years ago

8/5 forget to write what I have done. Put in today 8-5 make a small test through python threading module Use Queue to make requests send 100 per second. But there is always amazing things happened. I put 100 address in a Queue, and I also knew it was thread secure(in lock). then I make 100 thread to get address from queue and put requests to gaode api with the address. if the queue is empty, then the thread will quit as well. 100 address would be gained in a very shorted time. I print the queue as well. It is exact empty. but what is special is that requests num was total not 100, clear less than number. So I run it again, it changed the requests num but still not 100. Finally, I give up, I think I should learn the thread carefully. However, I still test a lot of things, include the request speed and cost time.

tianhaotian commented 8 years ago

8-6 continue finish the interface to catch company name through url finish the sql module and could gain the clear name instead of catch it through json response add some judge to return null info, but there still a problem that whether the full name could be same as simple name. It means some info caught isn't the company name but the website name. I don't know how or where to put those info.(in database?or just put it to null?)