SealSkin

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:

StageThe server is
placingchecking limits and choosing the node
forwardinghanding the launch to another node
storagepreparing the home directory
filesbringing the shared files up to date
imagepulling the application image
startingcreating the container
waitingwaiting for the desktop to answer
clienttaking the application's web client from the image, the first time
readydone; the answer carries the session URL
faileddone; 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
= 900
attributeMAX_RUNS
= 5000
funcbegin(launch_id, username) -> str | None

Start following the launch a request names and make it the current one.

paramlaunch_idAny

The id the client chose; anything but a UUID is ignored.

paramusernamestr

The user launching, who alone may ask about it.

Returns

str | None

The id when the launch is followed.

funcstep(stage, **detail) -> None

Note that the current launch reached stage; nothing when no launch is followed.

paramstagestr
paramdetailAny
= {}

Returns

None
funcforwarded(node_id, node_name) -> None

Note that the current launch was handed to another node.

paramnode_idstr
paramnode_namestr

Returns

None
funcfinish(result=None, error='', launch_id=None) -> None

End 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
= None
paramerrorstr
= ''
paramlaunch_idstr | None
= None

Returns

None
funcget(launch_id, username) -> dict[str, Any] | None

Return a launch's progress to the user who started it, or None.

paramlaunch_idstr
paramusernamestr

Returns

dict[str, typing.Any] | None
funcview(run) -> dict[str, Any]

Return what the client is told of a launch.

paramrundict[str, Any]

Returns

dict[str, typing.Any]