Use task_tracker for task tracking

This commit is contained in:
simon987
2019-03-24 20:21:43 -04:00
parent 00e3fd7340
commit 4ffe805b8d
29 changed files with 196 additions and 317 deletions

View File

@@ -1,11 +1,10 @@
import itertools
import os
import time
import ujson
import elasticsearch
import time
from elasticsearch import helpers
import os
import ujson
from apscheduler.schedulers.background import BackgroundScheduler
from elasticsearch import helpers
from search import logger
from search.filter import SearchFilter
@@ -318,8 +317,12 @@ class ElasticSearchEngine(SearchEngine):
"includes": ["path", "name", "ext"]
},
"query": {
"match_all": {}
}
"constant_score": {
"filter": {
"term": {"website_id": website_id}
}
}
},
},
index=self.index_name, request_timeout=20, routing=website_id)
for hit in hits: