reference
Class: Batch
task/batch.Batch
Table of contents
Constructors
Methods
Constructors
constructor
• new Batch(activity
, storageProvider
, logger?
)
Parameters
Name | Type |
---|---|
activity | Activity |
storageProvider | StorageProvider |
logger? | Logger |
Defined in
Methods
create
▸ Static
create(activity
, storageProvider
, logger?
): Batch
Parameters
Name | Type |
---|---|
activity | Activity |
storageProvider | StorageProvider |
logger? | Logger |
Returns
Defined in
run
▸ run(commandLine
): Batch
Execute a command on provider using a shell (/bin/sh).
Parameters
Name | Type | Description |
---|---|---|
commandLine | string | Shell command to execute. |
Returns
Defined in
▸ run(executable
, args
): Batch
Execute an executable on provider.
Parameters
Name | Type | Description |
---|---|---|
executable | string | Executable to run. |
args | string [] | Executable arguments. |
Returns
Defined in
transfer
▸ transfer(from
, to
): Batch
Parameters
Name | Type |
---|---|
from | string |
to | string |
Returns
Defined in
uploadFile
▸ uploadFile(src
, dst
): Batch
Parameters
Name | Type |
---|---|
src | string |
dst | string |
Returns
Defined in
uploadJson
▸ uploadJson(json
, dst
): Batch
Parameters
Name | Type |
---|---|
json | object |
dst | string |
Returns
Defined in
uploadData
▸ uploadData(data
, dst
): Batch
Parameters
Name | Type |
---|---|
data | Uint8Array |
dst | string |
Returns
Defined in
downloadFile
▸ downloadFile(src
, dst
): Batch
Parameters
Name | Type |
---|---|
src | string |
dst | string |
Returns
Defined in
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
endStream
▸ endStream(): Promise
<Readable
>
Returns
Promise
<Readable
>