JS API Reference

Class: Batch

activity/exe-unit/batch.Batch

Table of contents

Constructors

Methods

Constructors

constructor

new Batch(executor, storageProvider, logger): Batch

Parameters

NameType
executorExeScriptExecutor
storageProviderStorageProvider
loggerLogger

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:13

Methods

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/activity/exe-unit/batch.ts:26

run(executable, args): Batch

Execute an executable on provider.

Parameters

NameTypeDescription
executablestringExecutable to run.
argsstring[]Executable arguments.

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:34


transfer

transfer(from, to): Batch

Parameters

NameType
fromstring
tostring

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:45


uploadFile

uploadFile(src, dst): Batch

Parameters

NameType
srcstring
dststring

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:50


uploadJson

uploadJson(json, dst): Batch

Parameters

NameType
jsonobject
dststring

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:55


uploadData

uploadData(data, dst): Batch

Parameters

NameType
dataUint8Array
dststring

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:61


downloadFile

downloadFile(src, dst): Batch

Parameters

NameType
srcstring
dststring

Returns

Batch

Defined in

src/activity/exe-unit/batch.ts:66


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/activity/exe-unit/batch.ts:74


endStream

endStream(): Promise<Observable<Result<any>>>

Returns

Promise<Observable<Result<any>>>

Defined in

src/activity/exe-unit/batch.ts:139