File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
src/fastapi_cloud_cli/commands Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,26 @@ def _create_app(team_id: str, app_name: str) -> AppResponse:
9696
9797class DeploymentStatus (str , Enum ):
9898 waiting_upload = "waiting_upload"
99+ ready_for_build = "ready_for_build"
99100 building = "building"
101+ extracting = "extracting"
102+ building_image = "building_image"
100103 deploying = "deploying"
101104 success = "success"
102105 failed = "failed"
103- ready_for_build = "ready_for_build"
106+
107+ @classmethod
108+ def to_human_readable (cls , status : "DeploymentStatus" ) -> str :
109+ return {
110+ cls .waiting_upload : "Waiting for upload" ,
111+ cls .ready_for_build : "Ready for build" ,
112+ cls .building : "Building" ,
113+ cls .extracting : "Extracting" ,
114+ cls .building_image : "Building image" ,
115+ cls .deploying : "Deploying" ,
116+ cls .success : "Success" ,
117+ cls .failed : "Failed" ,
118+ }[status ]
104119
105120
106121class CreateDeploymentResponse (BaseModel ):
@@ -322,7 +337,10 @@ def _wait_for_deployment(
322337
323338 raise typer .Exit (1 )
324339 else :
325- progress .log (next (messages ))
340+ message = next (messages )
341+ progress .log (
342+ f"{ message } ({ DeploymentStatus .to_human_readable (deployment .status )} )"
343+ )
326344
327345 time .sleep (4 )
328346 time_elapsed += 4
You can’t perform that action at this time.
0 commit comments