Skip to content

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

ParameterTypeDescription
contextContextContext object.
titlestringLabel for the progress indicator.
jobsTList of jobs to run.
options?RunJobsWithProgressOptionsRun 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},
);

Matterway Assistant SDK Documentation