Skip to content

Commit

Permalink
Merge pull request #1016 from swirlai/DS-1275-to-public-dev
Browse files Browse the repository at this point in the history
Ds 1275 to public dev
  • Loading branch information
dnicodemus authored Dec 4, 2023
2 parents b75ac89 + 1894d46 commit 99f55b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions swirl/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
from swirl.search import search as run_search

SWIRL_EXPLAIN = getattr(settings, 'SWIRL_EXPLAIN', True)
SWIRL_RERUN_WAIT = getattr(settings, 'SWIRL_RERUN_WAIT', 8)
SWIRL_SUBSCRIBE_WAIT = getattr(settings, 'SWIRL_SUBSCRIBE_WAIT', 20)
SWIRL_Q_WAIT = getattr(settings, 'SWIRL_Q_WAIT', 7)

def remove_duplicates(my_list):
new_list = []
Expand Down Expand Up @@ -422,7 +420,6 @@ def list(self, request):
new_search.save()
logger.info(f"{request.user} search_q {new_search.id}")
# search_task.delay(new_search.id, Authenticator().get_session_data(request))
# time.sleep(SWIRL_Q_WAIT)
run_search(new_search.id, Authenticator().get_session_data(request),request=request)
return redirect(f'/swirl/results?search_id={new_search.id}')

Expand Down Expand Up @@ -496,9 +493,6 @@ def list(self, request):
return
return Response(paginate(results, self.request), status=status.HTTP_200_OK)
else:
tries = tries + 1
if tries > SWIRL_RERUN_WAIT:
return Response(f'Timeout: {tries}, {new_search.status}!!', status=status.HTTP_500_INTERNAL_SERVER_ERROR)
time.sleep(1)
# end if
# end if
Expand Down Expand Up @@ -532,7 +526,6 @@ def list(self, request):
rerun_search.save()
logger.info(f"{request.user} rerun {rerun_id}")
# search_task.delay(rerun_search.id, Authenticator().get_session_data(request))
# time.sleep(SWIRL_RERUN_WAIT)
run_search(rerun_search.id, Authenticator().get_session_data(request), request=request)
return redirect(f'/swirl/results?search_id={rerun_search.id}')
# end if
Expand Down
2 changes: 0 additions & 2 deletions swirl_server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@
SWIRL_DEFAULT_QUERY_LANGUAGE = 'english'
SWIRL_TIMEOUT_DEFAULT = 10
SWIRL_TIMEOUT = env.int('SWIRL_TIMEOUT',default=SWIRL_TIMEOUT_DEFAULT)
SWIRL_Q_WAIT = 7
SWIRL_RERUN_WAIT = 8
SWIRL_SUBSCRIBE_WAIT = 20
SWIRL_DEDUPE_FIELD = 'url'
SWIRL_DEDUPE_SIMILARITY_MINIMUM = 0.95
Expand Down

0 comments on commit 99f55b8

Please sign in to comment.