Better naming
This commit is contained in:
parent
ee32e5385b
commit
7c0fb7dda1
1 changed files with 5 additions and 4 deletions
|
@ -68,18 +68,19 @@ def generate_partial_history(user, t_start):
|
|||
""" Generate the part of the history resulting from the crawl starting at
|
||||
the given url.
|
||||
"""
|
||||
timestamp = t_start
|
||||
result = []
|
||||
basis = generate_first_url(user)
|
||||
result.append((basis, t_start))
|
||||
t_start += 5* random.weibullvariate(1, 1.5)
|
||||
result.append((basis, timestamp))
|
||||
timestamp += 5* random.weibullvariate(1, 1.5)
|
||||
queue = Queue()
|
||||
crawler = crawl.CrawlingThread(user, basis, queue)
|
||||
crawler.start()
|
||||
crawler.join()
|
||||
urls = queue.get()
|
||||
for url in urls:
|
||||
t_start += 5* random.weibullvariate(1, 1.5)
|
||||
result.append((url, t_start)
|
||||
timestamp += 5* random.weibullvariate(1, 1.5)
|
||||
result.append((url, timestamp))
|
||||
return result
|
||||
|
||||
def generate_first_url(user):
|
||||
|
|
Loading…
Reference in a new issue