Skip to content

Commit

Permalink
Update indexer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Oct 6, 2024
1 parent 3de4027 commit 1a88aea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/src/libs/indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,18 @@ class Indexer {
payload.document.indexOwnerBio = embedding.index.controllerDID.bio;
}

try {
const updatePayload = {
vector: embedding.vector,
item: itemStream.content,
indexId: embedding.index.id,
itemId: embedding.itemId,
};
await axios.post('http://app-api/api/updates', updatePayload);
} catch (e) {
console.log("App is down");
}

try {
await redis.publish(
`indexStream:${embedding.index.id}`,
Expand Down

0 comments on commit 1a88aea

Please sign in to comment.