Class: WorkContext
task/work.WorkContext
Work Context
Description
Table of contents
Constructors
Methods
Constructors
constructor
• new WorkContext(activity
, options?
)
Parameters
Name | Type |
---|---|
activity |
Activity |
options? |
WorkOptions |
Defined in
Methods
before
▸ before(): Promise
<void
| Result
[]>
Returns
Promise
<void
| Result
[]>
Defined in
run
▸ run(...args
): Promise
<Result
>
Parameters
Name | Type |
---|---|
...args |
(string | string [])[] |
Returns
Promise
<Result
>
Defined in
uploadFile
▸ uploadFile(src
, dst
): Promise
<Result
>
Parameters
Name | Type |
---|---|
src |
string |
dst |
string |
Returns
Promise
<Result
>
Defined in
uploadJson
▸ uploadJson(json
, dst
): Promise
<Result
>
Parameters
Name | Type |
---|---|
json |
object |
dst |
string |
Returns
Promise
<Result
>
Defined in
downloadFile
▸ downloadFile(src
, dst
): Promise
<Result
>
Parameters
Name | Type |
---|---|
src |
string |
dst |
string |
Returns
Promise
<Result
>
Defined in
beginBatch
▸ beginBatch(): Batch
Returns
Defined in
rejectResult
▸ rejectResult(msg
): void
Parameters
Name | Type |
---|---|
msg |
string |
Returns
void
Defined in
getWebsocketUri
▸ getWebsocketUri(port
): string
Parameters
Name | Type |
---|---|
port |
number |
Returns
string