Sfoglia il codice sorgente

Missed the required result.cached attribute.

pull/24/head
Ben Kurtovic 12 anni fa
parent
commit
8345559b3e
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      pages/copyvios.mako

+ 4
- 0
pages/copyvios.mako Vedi File

@@ -28,11 +28,14 @@
# result = get_cached_results(page, conn)
# if query.get("nocache") or not result:
# result = get_fresh_results(page, conn)
tstart = time()
mc1 = __import__("earwigbot").wiki.copyvios.MarkovChain(page.get())
mc2 = __import__("earwigbot").wiki.copyvios.MarkovChain(u"This is some random textual content for a page.")
mci = __import__("earwigbot").wiki.copyvios.MarkovChainIntersection(mc1, mc2)
result = __import__("earwigbot").wiki.copyvios.CopyvioCheckResult(
True, 0.67123, "http://example.com/", 7, mc1, (mc2, mci))
result.cached = False
result.tdiff = time() - tstart
# END TEST BLOCK
return page, result

@@ -58,6 +61,7 @@
def get_url_specific_results(page, url):
t_start = time()
result = page.copyvio_compare(url)
result.cached = False
result.tdiff = time() - t_start
return result



Caricamento…
Annulla
Salva