Extraction phases
Each snap-in must handle all the phases of Airdrop extraction. In a snap-in, you typically define a run function that iterates over events and invokes workers per extraction phase.
The SDK library exports processTask
to structure the work within each phase, and onTimeout
function
to handle timeouts.
The Airdrop snap-in extraction lifecycle consists of four phases:
- External sync units extraction
- Metadata extraction
- Data extraction
- Attachments extraction
Each phase is defined in a separate file and is responsible for fetching the respective data.
The SDK library provides a repository management system to handle artifacts in batches.
The initializeRepos
function initializes the repositories, and the push
function uploads the
artifacts to the repositories. The postState
function is used to post the state of the extraction task.
State management is crucial for snap-ins to maintain the state of the extraction task.
The postState
function is used to post the state of the extraction task.
The state is stored in the adapter and can be retrieved using the adapter.state
property.