@@ -286,14 +286,17 @@ def get_current_step(self):
286
286
return name
287
287
288
288
@property
289
- def current_step (self ):
289
+ def current_progressing_stage (self ) -> str :
290
290
return self .get_current_step ()
291
291
292
292
@property
293
- def is_downloading (self ):
294
- return self .current_step == "downloading_files"
293
+ def is_downloading (self ) -> bool :
294
+ return self .current_progressing_stage in [
295
+ "downloading_files" ,
296
+ "downloading_samplings" ,
297
+ ]
295
298
296
- def get_resume_method_name (self ):
299
+ def get_resume_method_name (self ) -> str :
297
300
resume_methods = {
298
301
"waiting_assign" : "restart" ,
299
302
"transferring" : "restart" ,
@@ -304,11 +307,11 @@ def get_resume_method_name(self):
304
307
if step_name :
305
308
return resume_methods [step_name ]
306
309
307
- def inc_retry_times (self ):
310
+ def inc_retry_times (self ) -> None :
308
311
self .retry_times += 1
309
312
self .save ()
310
313
311
- def schedule_resume (self ):
314
+ def schedule_resume (self ) -> None :
312
315
if not self .failed :
313
316
return
314
317
method_name = self .get_resume_method_name ()
@@ -317,12 +320,12 @@ def schedule_resume(self):
317
320
method ()
318
321
319
322
@classmethod
320
- def schedule_resume_failed (cls ):
323
+ def schedule_resume_failed (cls ) -> None :
321
324
for task in cls .filter_failed ():
322
325
task .schedule_resume ()
323
326
324
327
@property
325
- def done (self ):
328
+ def done (self ) -> bool :
326
329
if self .failed :
327
330
return False
328
331
if not self .full_downloaded_at :
@@ -332,7 +335,7 @@ def done(self):
332
335
return True
333
336
334
337
@property
335
- def recoverable (self ):
338
+ def recoverable (self ) -> bool :
336
339
if not self .failed :
337
340
return False
338
341
0 commit comments