-
Notifications
You must be signed in to change notification settings - Fork 25
feat: Async Retriever
add url_requester
#211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
465cd81
feat: POC for url_requester
artem1205 0421ae1
feat: ref
artem1205 c641e26
feat: ref
artem1205 b8953f1
Merge remote-tracking branch 'origin/main' into artem1205/async-retri…
artem1205 e0fe91e
Merge remote-tracking branch 'origin/main' into artem1205/async-retri…
artem1205 b72499a
CDK: ref
artem1205 90efe40
CDK: fix mypy
artem1205 d0a7291
CDK: fix add README.md
artem1205 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# AsyncHttpJobRepository sequence diagram | ||
|
||
- Components marked as optional are not required and can be ignored. | ||
- if `url_requester` is not provided, `urls_extractor` will get urls from the `polling_job_response` | ||
- interpolation_context, e.g. `create_job_response` or `polling_job_response` can be obtained from stream_slice | ||
|
||
|
||
```mermaid | ||
--- | ||
title: AsyncHttpJobRepository Sequence Diagram | ||
--- | ||
sequenceDiagram | ||
participant AsyncHttpJobRepository as AsyncOrchestrator | ||
participant CreationRequester as creation_requester | ||
participant PollingRequester as polling_requester | ||
participant UrlRequester as url_requester (Optional) | ||
participant DownloadRetriever as download_retriever | ||
participant AbortRequester as abort_requester (Optional) | ||
participant DeleteRequester as delete_requester (Optional) | ||
participant Reporting Server as Async Reporting Server | ||
|
||
AsyncHttpJobRepository ->> CreationRequester: Initiate job creation | ||
CreationRequester ->> Reporting Server: Create job request | ||
Reporting Server -->> CreationRequester: Job ID response | ||
CreationRequester -->> AsyncHttpJobRepository: Job ID | ||
|
||
loop Poll for job status | ||
AsyncHttpJobRepository ->> PollingRequester: Check job status | ||
PollingRequester ->> Reporting Server: Status request (interpolation_context: `create_job_response`) | ||
Reporting Server -->> PollingRequester: Status response | ||
PollingRequester -->> AsyncHttpJobRepository: Job status | ||
end | ||
|
||
alt Status: Ready | ||
AsyncHttpJobRepository ->> UrlRequester: Request download URLs (if applicable) | ||
UrlRequester ->> Reporting Server: URL request (interpolation_context: `polling_job_response`) | ||
Reporting Server -->> UrlRequester: Download URLs | ||
UrlRequester -->> AsyncHttpJobRepository: Download URLs | ||
|
||
AsyncHttpJobRepository ->> DownloadRetriever: Download reports | ||
DownloadRetriever ->> Reporting Server: Retrieve report data (interpolation_context: `url`) | ||
Reporting Server -->> DownloadRetriever: Report data | ||
DownloadRetriever -->> AsyncHttpJobRepository: Report data | ||
else Status: Failed | ||
AsyncHttpJobRepository ->> AbortRequester: Send abort request | ||
AbortRequester ->> Reporting Server: Abort job | ||
Reporting Server -->> AbortRequester: Abort confirmation | ||
AbortRequester -->> AsyncHttpJobRepository: Confirmation | ||
end | ||
|
||
AsyncHttpJobRepository ->> DeleteRequester: Send delete job request | ||
DeleteRequester ->> Reporting Server: Delete job | ||
Reporting Server -->> DeleteRequester: Deletion confirmation | ||
DeleteRequester -->> AsyncHttpJobRepository: Confirmation | ||
|
||
|
||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.