File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
client/src/connection/rest Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -142,21 +142,11 @@ class RestSession extends Session {
142
142
if ( ! this . _computeSession ?. sessionId ) {
143
143
throw new Error ( ) ;
144
144
}
145
-
146
145
//Get the job
147
146
const job = await this . _computeSession . execute ( { code : [ code ] } ) ;
148
- let state = await job . getState ( ) ;
149
-
150
- const retLog = this . printJobLog ( job ) ;
151
-
152
- //Wait until the job is complete
153
- do {
154
- state = await job . getState ( { onChange : true , wait : 2 } ) ;
155
- } while ( await job . isDone ( state ) ) ;
156
147
157
148
//Clear out the logs
158
- await retLog ;
159
-
149
+ await this . printJobLog ( job ) ;
160
150
//Now get the results
161
151
const results = await job . results ( ) ;
162
152
@@ -290,7 +280,7 @@ class RestSession extends Session {
290
280
* @param job a job id to print logs for.
291
281
*/
292
282
private printJobLog = async ( job : ComputeJob ) => {
293
- const logs = await job . getLogStream ( ) ;
283
+ const logs = job . getLogStream ( ) ;
294
284
for await ( const log of logs ) {
295
285
if ( log ?. length > 0 ) {
296
286
this . _onExecutionLogFn ( log ) ;
You can’t perform that action at this time.
0 commit comments