reference

Class: Batch

task/batch.Batch

Table of contents

Constructors

Methods

Constructors

constructor

new Batch(activity, storageProvider, logger?): Batch

Parameters

NameType
activityActivity
storageProviderStorageProvider
logger?Logger

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.

In case any of the commands will fail, the execution of the batch will be interrupted by the Provider.

Returns

Promise<Result<any>[]>

Defined in

src/task/batch.ts:78


endStream

endStream(): Promise<Readable>

Returns

Promise<Readable>

Defined in

src/task/batch.ts:111