callback
Exit-time save archive push to the parent (RomM).
Exit-time save archive push to the parent (RomM).
The broker is normally served same-origin under the parent's SUBFOLDER, so
activate derives the callback base URL from the request that launched the
session; an explicit callback.base_url in the activate payload overrides it
for split-origin deployments.
attributelog= logging.getLogger(__name__)funcpublic_view(callback) -> Optional[dict[str, Any]]Return the callback info that is safe to echo in reports: everything but the token.
paramcallbackOptional[dict[str, Any]]The session's callback dict, or None when the session has none.
Returns
typing.OptionalA copy of callback without its token key, or None when callback is
funcpush_save_archive(callback, zip_bytes, filename, sess) -> dict[str, Any]POST the save archive to the callback origin as multipart form data.
Failures are reported, never raised: exit teardown must finish regardless.
paramcallbackdict[str, Any]The session's callback dict; base_url is required and
token, when present, is sent as a bearer token.
paramzip_bytesbytesThe archive body.
paramfilenamestrThe filename to attach to the multipart archive field.
paramsessdict[str, Any]The session the archive belongs to; its id, emulator and rom are sent as form fields alongside the archive.
Returns
dictA report of the shape {"mode": "uploaded" | "failed", "ok": bool, "url": str, ...},