Skip to content

Commit

Permalink
Merge pull request #20 from alkem-io/develop
Browse files Browse the repository at this point in the history
Release: Fix ingesting root space PDFs
  • Loading branch information
valentinyanakiev authored Jun 5, 2024
2 parents 0a3e0a1 + 4f9e436 commit 3ffd262
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ RABBITMQ_HOST=localhost
RABBITMQ_USER=alekmio-admin
RABBITMQ_PASSWORD=alkemio!
RABBITMQ_PORT=5672
RABBITMQ_QUEUE=virtual-contributor-added-to-space
RABBITMQ_QUEUE=virtual-contributor-ingest-space

API_ENDPOINT_PRIVATE_GRAPHQL='http://localhost:3000/api/private/non-interactive/graphql'
AUTH_ORY_KRATOS_PUBLIC_BASE_URL=http://localhost:3000/ory/kratos/public
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alkemio/space-ingest",
"version": "0.4.0",
"version": "0.4.1",
"description": "",
"author": "Alkemio Foundation",
"private": true,
Expand Down
17 changes: 3 additions & 14 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,9 @@ export const main = async (spaceId: string, purpose: SpaceIngestionPurpose) => {
logger.error(`Space ${spaceId} not found.`);
return;
}
const documents: Document[] = [];
// const documents = new Documents();
const { documentId, source, pageContent, type, title } =
generateDocument(space);
documents.push(
new Document({
pageContent,
metadata: {
documentId,
source,
type,
title,
},
})
const documents: Document[] = await handleSubspaces(
[space as Partial<Space>],
alkemioClient
);

const subspacesDocs = await handleSubspaces(
Expand Down

0 comments on commit 3ffd262

Please sign in to comment.