Error in the merge, mea culpa

This commit is contained in:
Rémi Oudin 2018-02-26 14:01:29 +01:00
parent db067e56fc
commit c4f63a92b2

View file

@ -6,7 +6,6 @@ interests, keywords...
from collections import namedtuple
import random
from math import floor
from queue import Queue
from xml.etree import ElementTree as ET
from datetime import datetime
from django.db import models
@ -168,11 +167,11 @@ def generate_partial_history(user, t_start):
basis = generate_first_url(user)
result.append(PartialHistoryEntry(basis, timestamp))
t_start += 5 * random.weibullvariate(1, 1.5)
queue = Queue()
crawler = crawl.CrawlingThread(basis, queue)
output_tree = []
crawler = crawl.CrawlingThread(basis, output_tree)
crawler.start()
crawler.join()
urls = queue.get()
urls = crawler.output_tree
for url in urls:
t_start += 5 * random.weibullvariate(1, 1.5)
result.append(PartialHistoryEntry(url, timestamp))