@eclipse-che/devworkspace-client
Advanced tools
Comparing version 0.0.1-1614264002 to 0.0.1-1614265173
@@ -7,3 +7,3 @@ import { AxiosInstance } from 'axios'; | ||
private projectInitRequestTimeoutMs; | ||
private projectRequestDelay; | ||
private projectRequestDelayMs; | ||
constructor(axios: AxiosInstance); | ||
@@ -10,0 +10,0 @@ listInNamespace(namespace: string): Promise<IDevWorkspace[]>; |
@@ -498,3 +498,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
this.projectInitRequestTimeoutMs = 10000; | ||
this.projectRequestDelay = 100; | ||
this.projectRequestDelayMs = 100; | ||
this.axios = axios; | ||
@@ -674,7 +674,7 @@ } | ||
return __awaiter(this, void 0, void 0, function () { | ||
var secondsAttempted, request; | ||
var millisecondsAttempted, request; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
secondsAttempted = 0; | ||
millisecondsAttempted = 0; | ||
return [4 /*yield*/, this.doesProjectExist(namespace)]; | ||
@@ -685,13 +685,13 @@ case 1: | ||
case 2: | ||
if (!(secondsAttempted < this.projectInitRequestTimeoutMs && !request)) return [3 /*break*/, 5]; | ||
if (!(millisecondsAttempted < this.projectInitRequestTimeoutMs && !request)) return [3 /*break*/, 5]; | ||
return [4 /*yield*/, this.doesProjectExist(namespace)]; | ||
case 3: | ||
request = _a.sent(); | ||
return [4 /*yield*/, helper_1.delay(this.projectRequestDelay)]; | ||
return [4 /*yield*/, helper_1.delay(this.projectRequestDelayMs)]; | ||
case 4: | ||
_a.sent(); | ||
secondsAttempted += this.projectRequestDelay; | ||
millisecondsAttempted += this.projectRequestDelayMs; | ||
return [3 /*break*/, 2]; | ||
case 5: | ||
if (secondsAttempted === this.projectInitRequestTimeoutMs) { | ||
if (millisecondsAttempted >= this.projectInitRequestTimeoutMs) { | ||
throw new Error("Project " + namespace + " could not be initialized in " + this.projectInitRequestTimeoutMs / 1000 + " seconds"); | ||
@@ -698,0 +698,0 @@ } |
{ | ||
"name": "@eclipse-che/devworkspace-client", | ||
"version": "0.0.1-1614264002", | ||
"version": "0.0.1-1614265173", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/server.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
22360767