@@ -51,12 +51,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
5151 check : "osparc.widget.PersistentIframe" ,
5252 init : null ,
5353 nullable : true
54- } ,
55-
56- polling : {
57- check : "Boolean" ,
58- init : null ,
59- nullable : true
6054 }
6155 } ,
6256
@@ -70,11 +64,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
7064 __retriesLeft : null ,
7165
7266 startPolling : function ( ) {
73- if ( this . isPolling ( ) ) {
74- return ;
75- }
76- this . setPolling ( true ) ;
77-
7867 this . getNode ( ) . getStatus ( ) . getProgressSequence ( )
7968 . resetSequence ( ) ;
8069
@@ -159,12 +148,10 @@ qx.Class.define("osparc.data.model.IframeHandler", {
159148 __nodeState : function ( ) {
160149 // Check if study is still there
161150 if ( this . getStudy ( ) === null || this . __stopRequestingStatus === true ) {
162- this . setPolling ( false ) ;
163151 return ;
164152 }
165153 // Check if node is still there
166154 if ( this . getStudy ( ) . getWorkbench ( ) . getNode ( this . getNode ( ) . getNodeId ( ) ) === null ) {
167- this . setPolling ( false ) ;
168155 return ;
169156 }
170157
@@ -191,7 +178,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
191178 } ;
192179 node . fireDataEvent ( "showInLogger" , errorMsgData ) ;
193180 if ( "status" in err && err . status === 406 ) {
194- this . setPolling ( false ) ;
195181 return ;
196182 }
197183 if ( this . __unresponsiveRetries > 0 ) {
@@ -204,7 +190,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
204190 node . fireDataEvent ( "showInLogger" , retryMsgData ) ;
205191 this . __unresponsiveRetries -- ;
206192 } else {
207- this . setPolling ( false ) ;
208193 node . getStatus ( ) . setInteractive ( "failed" ) ;
209194 osparc . FlashMessenger . getInstance ( ) . logAs ( this . tr ( "There was an error starting" ) + " " + node . getLabel ( ) , "ERROR" ) ;
210195 }
@@ -216,15 +201,12 @@ qx.Class.define("osparc.data.model.IframeHandler", {
216201 const nodeId = data [ "service_uuid" ] ;
217202 const node = this . getNode ( ) ;
218203 const status = node . getStatus ( ) ;
219- let pollingInNextStage = null ;
220204 switch ( serviceState ) {
221205 case "idle" : {
222206 status . setInteractive ( serviceState ) ;
223207 if ( this . __unresponsiveRetries > 0 ) {
224208 // a bit of a hack. We will get rid of it when the backend pushes the states
225209 this . __unresponsiveRetries -- ;
226- } else {
227- this . setPolling ( false ) ;
228210 }
229211 break ;
230212 }
@@ -266,7 +248,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
266248 this . __retriesLeft = 40 ;
267249 this . __waitForServiceReady ( srvUrl ) ;
268250 }
269- pollingInNextStage = true ;
270251 break ;
271252 }
272253 case "complete" :
@@ -286,16 +267,12 @@ qx.Class.define("osparc.data.model.IframeHandler", {
286267 console . error ( serviceState , "service state not supported" ) ;
287268 break ;
288269 }
289- if ( pollingInNextStage !== true ) {
290- this . setPolling ( false ) ;
291- }
292270 } ,
293271
294272 __waitForServiceReady : function ( srvUrl ) {
295273 this . getNode ( ) . getStatus ( ) . setInteractive ( "connecting" ) ;
296274
297275 if ( this . __retriesLeft === 0 ) {
298- this . setPolling ( false ) ;
299276 return ;
300277 }
301278
@@ -304,7 +281,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
304281
305282 // Check if node is still there
306283 if ( this . getStudy ( ) . getWorkbench ( ) . getNode ( this . getNode ( ) . getNodeId ( ) ) === null ) {
307- this . setPolling ( false ) ;
308284 return ;
309285 }
310286 const interval = 5000 ;
@@ -322,7 +298,6 @@ qx.Class.define("osparc.data.model.IframeHandler", {
322298 console . log ( "Connecting: fetch's response status" , response . status ) ;
323299 }
324300 if ( response . status < 400 ) {
325- this . setPolling ( false ) ;
326301 this . __serviceReadyIn ( srvUrl ) ;
327302 } else {
328303 console . log ( `Connecting: ${ srvUrl } is not reachable. Status: ${ response . status } ` ) ;
0 commit comments