@@ -176,9 +176,15 @@ def status(
176
176
ready = False
177
177
status = CodeFlareClusterStatus .FAILED # should deleted be separate
178
178
return status , ready # exit early, no need to check ray status
179
- elif appwrapper .status in [AppWrapperStatus .PENDING ]:
179
+ elif appwrapper .status in [
180
+ AppWrapperStatus .PENDING ,
181
+ AppWrapperStatus .QUEUEING ,
182
+ ]:
180
183
ready = False
181
- status = CodeFlareClusterStatus .QUEUED
184
+ if appwrapper .status == AppWrapperStatus .PENDING :
185
+ status = CodeFlareClusterStatus .QUEUED
186
+ else :
187
+ status = CodeFlareClusterStatus .QUEUEING
182
188
if print_to_console :
183
189
pretty_print .print_app_wrappers_status ([appwrapper ])
184
190
return (
@@ -561,11 +567,18 @@ def _map_to_ray_cluster(rc) -> Optional[RayCluster]:
561
567
562
568
563
569
def _map_to_app_wrapper (aw ) -> AppWrapper :
570
+ if "status" in aw and "canrun" in aw ["status" ]:
571
+ return AppWrapper (
572
+ name = aw ["metadata" ]["name" ],
573
+ status = AppWrapperStatus (aw ["status" ]["state" ].lower ()),
574
+ can_run = aw ["status" ]["canrun" ],
575
+ job_state = aw ["status" ]["queuejobstate" ],
576
+ )
564
577
return AppWrapper (
565
578
name = aw ["metadata" ]["name" ],
566
- status = AppWrapperStatus (aw [ "status" ][ "state" ]. lower () ),
567
- can_run = aw [ "status" ][ "canrun" ] ,
568
- job_state = aw [ "status" ][ "queuejobstate" ] ,
579
+ status = AppWrapperStatus ("queueing" ),
580
+ can_run = False ,
581
+ job_state = "Still adding to queue" ,
569
582
)
570
583
571
584
0 commit comments