Skip to content

Commit

Permalink
serialise json for reindexing;
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbc committed May 15, 2024
1 parent b3fa6ac commit 3868953
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graphql_api/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def resolve_nodes(root, info, id_in, **kwargs):
def resolve_reindex(root, info, id_in, **kwargs):
t0 = dt.utcnow()
result = []

log.info(f'resolve_resolve_reindex id_in: {id_in}')
for gid in id_in:
object_type, object_id = from_global_id(gid)
handler = get_datastore_handler(object_type)
Expand Down
3 changes: 2 additions & 1 deletion graphql_api/schema/search_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Search Manager
"""
import logging
import json
from datetime import datetime as dt

import requests
Expand Down Expand Up @@ -40,7 +41,7 @@ def index_document(self, key, document):
response = requests.put(
self._url + es_key,
auth=self._awsauth,
json=document,
json=json.dumps(document),
headers=headers,
timeout=(ES_CONNECT_TIMEOUT, ES_READ_TIMEOUT),
)
Expand Down

0 comments on commit 3868953

Please sign in to comment.