瀏覽代碼

Temporary just select some URLs at random for initialization

Daoud Clarke 1 年之前
父節點
當前提交
7c3aea5ca0
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      mwmbl/crawler/urls.py

+ 3 - 1
mwmbl/crawler/urls.py

@@ -132,10 +132,12 @@ class URLDatabase:
         sql = f"""
         SELECT url, status, user_id_hash, score, updated FROM urls
         WHERE status = %(status)s
-        ORDER BY score DESC
         LIMIT %(num_urls)s
         """
 
+        # TODO: reinstate this line once performance issue is resolved:
+        #         ORDER BY score DESC
+
         with self.connection.cursor() as cursor:
             cursor.execute(sql, {'status': status.value, 'num_urls': num_urls})
             results = cursor.fetchall()