aboutsummaryrefslogtreecommitdiff
path: root/src/client/northstar/operations
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2019-12-03 16:32:13 -0500
committerkimdahey <claire_kim1@brown.edu>2019-12-03 16:32:13 -0500
commit70583fa47bd9920d1823d381708c81283534d6ce (patch)
tree5c81976813436852403ea352797efe1d518dbb1a /src/client/northstar/operations
parent56b83d89f37a5523ab319977e3385f539ecaf996 (diff)
parent213962406327cc2f7267064f3016fabf0fd16872 (diff)
merged w master
Diffstat (limited to 'src/client/northstar/operations')
-rw-r--r--src/client/northstar/operations/BaseOperation.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/northstar/operations/BaseOperation.ts b/src/client/northstar/operations/BaseOperation.ts
index 0d1361ebf..013f2244e 100644
--- a/src/client/northstar/operations/BaseOperation.ts
+++ b/src/client/northstar/operations/BaseOperation.ts
@@ -44,12 +44,12 @@ export abstract class BaseOperation {
}
}
- let operationParameters = this.CreateOperationParameters();
+ const operationParameters = this.CreateOperationParameters();
if (this.Result) {
this.Result.progress = 0;
} // bcz: used to set Result to undefined, but that causes the display to blink
this.Error = "";
- let salt = Math.random().toString();
+ const salt = Math.random().toString();
this.RequestSalt = salt;
if (!operationParameters) {
@@ -59,27 +59,27 @@ export abstract class BaseOperation {
this.ComputationStarted = true;
//let start = performance.now();
- let promise = Gateway.Instance.StartOperation(operationParameters.toJSON());
+ const promise = Gateway.Instance.StartOperation(operationParameters.toJSON());
promise.catch(err => {
action(() => {
this.Error = err;
console.error(err);
});
});
- let operationReference = await promise;
+ const operationReference = await promise;
if (operationReference) {
this.OperationReference = operationReference;
- let resultParameters = new ResultParameters();
+ const resultParameters = new ResultParameters();
resultParameters.operationReference = operationReference;
- let pollPromise = new PollPromise(salt, operationReference);
+ const pollPromise = new PollPromise(salt, operationReference);
BaseOperation._currentOperations.set(this.Id, pollPromise);
pollPromise.Start(async () => {
- let result = await Gateway.Instance.GetResult(resultParameters.toJSON());
+ const result = await Gateway.Instance.GetResult(resultParameters.toJSON());
if (result instanceof ErrorResult) {
throw new Error((result).message);
}