Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Improved Polling Version 1#170

Merged
saquino0827 merged 17 commits into
mainfrom
task-get-results-improvement
May 8, 2025
Merged

Improved Polling Version 1#170
saquino0827 merged 17 commits into
mainfrom
task-get-results-improvement

Conversation

@saquino0827
Copy link
Copy Markdown
Contributor

Changes proposed in this pull request

  • Update the following lambda's and their subsequence services and implementations
    • Get Document
      • Now polls for a document status and returns 200 if processing. It no longer returns 404 not found
    • Create Document
      • Now stores the file in S3 and initializes DynamoDb with initial file metadata
    • Write Document
      • Updates the document status field with "complete"
  • Update and fix unit test coverage

@saquino0827 saquino0827 requested a review from a team as a code owner May 7, 2025 21:52
Copy link
Copy Markdown
Contributor

@lrichardson-work lrichardson-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Copy Markdown
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small things, then I think it is good.

from src.storage import CloudStorage


# rename create_document
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, let's remove this comment since we thought better of this.

Comment thread backend/src/documents/write_document.py Outdated
Comment on lines 34 to 36
def write_document_initialization(document_id: str, status: str, database: Database = None):
item_to_store = {"document_id": document_id, "status": "processing"}
database.write_document(item_to_store)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this function, right?

@saquino0827
Copy link
Copy Markdown
Contributor Author

Two small things, then I think it is good.

Good catch, these are fixed now.

@saquino0827 saquino0827 merged commit 992a972 into main May 8, 2025
11 checks passed
@saquino0827 saquino0827 deleted the task-get-results-improvement branch May 8, 2025 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants