Pr to add async_fetch_token_metadata to MetadataPipeline andgen_fetch_content to MetadataFetcher. Also updates Adapters and Fetchers to handle async.
Motivation and Context
With large amounts of metadata requests the Offchain MetadataPipeline can be slow as it handles every request sequentially. This pr will introduce the option to make async requests to reduce the overall time it takes to process large amounts of metadata requests.
This pr adds:
async_fetch_token_metadata to MetadataPipeline
async_run to MetadataPipeline
gen_fetch_content to MetadataFetcher
_gen to MetadataFetcher
gen_send to each of the DEFAULT_ADAPTER_CONFIGS(IPFSAdapter, ARWeaveAdapter, DataUriAdapter, HTTPAdapter)
How has this been tested?
unit tests (added unit tests for MetadataPipeline as well as Fetchers)
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Description
Pr to add
async_fetch_token_metadata
toMetadataPipeline
andgen_fetch_content
toMetadataFetcher
. Also updatesAdapters
andFetchers
to handle async.Motivation and Context
With large amounts of metadata requests the Offchain
MetadataPipeline
can be slow as it handles every request sequentially. This pr will introduce the option to make async requests to reduce the overall time it takes to process large amounts of metadata requests.This pr adds:
async_fetch_token_metadata
toMetadataPipeline
async_run
toMetadataPipeline
gen_fetch_content
toMetadataFetcher
_gen
toMetadataFetcher
gen_send
to each of the DEFAULT_ADAPTER_CONFIGS(IPFSAdapter
,ARWeaveAdapter
,DataUriAdapter
,HTTPAdapter
)How has this been tested?
MetadataPipeline
as well asFetchers
)Screenshots (if appropriate):
Types of changes
Checklist: