@@ -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 (
@@ -563,11 +569,18 @@ def _map_to_ray_cluster(rc) -> Optional[RayCluster]:
563
569
564
570
565
571
def _map_to_app_wrapper (aw ) -> AppWrapper :
572
+ if "status" in aw and "canrun" in aw ["status" ]:
573
+ return AppWrapper (
574
+ name = aw ["metadata" ]["name" ],
575
+ status = AppWrapperStatus (aw ["status" ]["state" ].lower ()),
576
+ can_run = aw ["status" ]["canrun" ],
577
+ job_state = aw ["status" ]["queuejobstate" ],
578
+ )
566
579
return AppWrapper (
567
580
name = aw ["metadata" ]["name" ],
568
- status = AppWrapperStatus (aw [ "status" ][ "state" ]. lower () ),
569
- can_run = aw [ "status" ][ "canrun" ] ,
570
- job_state = aw [ "status" ][ "queuejobstate" ] ,
581
+ status = AppWrapperStatus ("queueing" ),
582
+ can_run = False ,
583
+ job_state = "Still adding to queue" ,
571
584
)
572
585
573
586
0 commit comments