progress
Where a launch is, for the page that waits on it.
A client that wants to show progress names its launch (launch_id, a UUID it
makes up) in the launch request and asks GET /api/launch/progress/<id> while
the request runs. The launch reports each stage it reaches with step:
| Stage | The server is |
|---|---|
placing | checking limits and choosing the node |
forwarding | handing the launch to another node |
storage | preparing the home directory |
files | bringing the shared files up to date |
image | pulling the application image |
starting | creating the container |
waiting | waiting for the desktop to answer |
client | taking the application's web client from the image, the first time |
ready | done; the answer carries the session URL |
failed | done; the answer carries the reason |
Closing an App Laboratory session reports stopping and saving the same
way, ending in ready with the template's files and bytes.
The launch in progress is carried in a context variable, so the code that reaches a stage needs to know nothing of who asked. A frontend that forwarded the launch asks the node that runs it.
attributeKEEP_SECONDS= 900attributeMAX_RUNS= 5000funcbegin(launch_id, username) -> str | NoneStart following the launch a request names and make it the current one.
paramlaunch_idAnyThe id the client chose; anything but a UUID is ignored.
paramusernamestrThe user launching, who alone may ask about it.
Returns
str | NoneThe id when the launch is followed.
funcstep(stage, **detail) -> NoneNote that the current launch reached stage; nothing when no launch is followed.
paramstagestrparamdetailAny= {}Returns
Nonefuncforwarded(node_id, node_name) -> NoneNote that the current launch was handed to another node.
paramnode_idstrparamnode_namestrReturns
Nonefuncfinish(result=None, error='', launch_id=None) -> NoneEnd a launch, the current one by default, with its answer or the reason it failed.
A launch that ended already keeps its first ending.
paramresultdict[str, Any] | None= Noneparamerrorstr= ''paramlaunch_idstr | None= NoneReturns
Nonefuncget(launch_id, username) -> dict[str, Any] | NoneReturn a launch's progress to the user who started it, or None.
paramlaunch_idstrparamusernamestrReturns
dict[str, typing.Any] | Nonefuncview(run) -> dict[str, Any]Return what the client is told of a launch.
paramrundict[str, Any]Returns
dict[str, typing.Any]