JS API Reference

Class: Batch

task/batch.Batch

Table of contents

Constructors

Methods

Constructors

constructor

new Batch(activity, storageProvider, logger): Batch

Parameters

NameType
activityActivity
storageProviderStorageProvider
loggerLogger

Returns

Batch

Defined in

src/task/batch.ts:15

Methods

create

create(activity, storageProvider, logger?): Batch

Parameters

NameType
activityActivity
storageProviderStorageProvider
logger?Logger

Returns

Batch

Defined in

src/task/batch.ts:11


run

run(commandLine): Batch

Execute a command on provider using a shell (/bin/sh).

Parameters

NameTypeDescription
commandLinestringShell command to execute.

Returns

Batch

Defined in

src/task/batch.ts:28

run(executable, args): Batch

Execute an executable on provider.

Parameters

NameTypeDescription
executablestringExecutable to run.
argsstring[]Executable arguments.

Returns

Batch

Defined in

src/task/batch.ts:36


transfer

transfer(from, to): Batch

Parameters

NameType
fromstring
tostring

Returns

Batch

Defined in

src/task/batch.ts:47


uploadFile

uploadFile(src, dst): Batch

Parameters

NameType
srcstring
dststring

Returns

Batch

Defined in

src/task/batch.ts:52


uploadJson

uploadJson(json, dst): Batch

Parameters

NameType
jsonobject
dststring

Returns

Batch

Defined in

src/task/batch.ts:57


uploadData

uploadData(data, dst): Batch

Parameters

NameType
dataUint8Array
dststring

Returns

Batch

Defined in

src/task/batch.ts:63


downloadFile

downloadFile(src, dst): Batch

Parameters

NameType
srcstring
dststring

Returns

Batch

Defined in

src/task/batch.ts:68


end

end(): Promise<Result<any>[]>

Executes the batch of commands added via run returning result for each of the steps.

Returns

Promise<Result<any>[]>

Defined in

src/task/batch.ts:76


endStream

endStream(): Promise<Readable>

Returns

Promise<Readable>

Defined in

src/task/batch.ts:141