{{{
def recall(word):
dict_result = {}
word_fields = word.split(":")
for i in range(0,len(word_fields)):
generate(dict_resut)
pre_result = sorted(dict_result.items(),
key=operator.itemgetter(1),reverse=True)
return recall_tag[:-1]
client code is:
for line in sys.stdin:
line = line.rstrip('\n')
fields = line.split("\t")
id = fields[0]
title = fields[1]
page_params_mq = {'id':vid,'title':title}
try :
rec_mq_res = get_rec(server_ip_mq, server_port_mq,
web_page_mq, page_params_mq)
except:
print (line)
}}}
I run
cat test_data|python client.py
if there is only one data in test_data file,it is ok.If there are many
data,it will occur randomly slowly
--
Ticket URL: <https://code.djangoproject.com/ticket/30707>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
* version: 2.2 => master
* component: Testing framework => Core (Other)
Comment:
I don't see anything Django-specific in attached example. It is rather a
question about how `sorted()` works on iterables in Python.
Closing per TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/30707#comment:1>