Appearance
Function: runJobsWithProgress()
ts
function runJobsWithProgress<T>(
context: Context,
title: string,
jobs: T,
options?: RunJobsWithProgressOptions): JobResults<T>;Defined in: packages/sdk/src/progress/runJobsWithProgress.ts:32
Run jobs while showing a progress indicator, removed once they settle.
Type Parameters
| Type Parameter |
|---|
T extends JobList |
Parameters
| Parameter | Type | Description |
|---|---|---|
context | Context | Context object. |
title | string | Label for the progress indicator. |
jobs | T | List of jobs to run. |
options? | RunJobsWithProgressOptions | Run and display options. |
Returns
JobResults<T>
Example
ts
import {runJobsWithProgress} from '@matterway/sdk-progress';
await runJobsWithProgress(
context,
'Deploying satellites',
[
{title: 'Launch booster', handler: async () => launchBooster()},
{title: 'Deploy payload', handler: async () => deployPayload()},
],
{concurrency: 1, overlay: true},
);