Skip to main content

JobResult

from lium.sdk import JobResult

Defined in lium.sdk.bounded_job.

What run_job() did. to_dict() is JSON-ready.

cleanup is "removed" (the pod was deleted and is gone from the pod list), "scheduled" (its absence was not confirmed; the acknowledged server-side removal at removal_scheduled_at stands), "not_rented" (the rent was refused), or "unknown" (neither removal nor a schedule was confirmed, or a rent whose answer was lost may still have created a pod named name: check ps()). removal_scheduled_at is set only once the server acknowledged the schedule. cost_usd is what the billing statement shows for the pod, read only after a confirmed removal (None otherwise, or when the statement does not list it yet); estimated_cost_usd is the rent's hourly price times the seconds from just before the rent request to removal (to removal_scheduled_at when removal is unconfirmed).

JobResult(
status: str,
name: str,
exit_code: Optional[int] = None,
stdout: str = '',
stderr: str = '',
error: Optional[str] = None,
pod_id: Optional[str] = None,
price_per_hour: Optional[float] = None,
removal_scheduled_at: Optional[str] = None,
outputs: Dict[str, str] = <factory>,
missing_outputs: Dict[str, str] = <factory>,
cleanup: str = 'not_rented',
cost_usd: Optional[float] = None,
estimated_cost_usd: Optional[float] = None,
seconds: float = 0.0
)

Fields​

NameTypeDefault
statusstr
namestr
exit_codeOptional[int]None
stdoutstr''
stderrstr''
errorOptional[str]None
pod_idOptional[str]None
price_per_hourOptional[float]None
removal_scheduled_atOptional[str]None
outputsDict[str, str]
missing_outputsDict[str, str]
cleanupstr'not_rented'
cost_usdOptional[float]None
estimated_cost_usdOptional[float]None
secondsfloat0.0

Properties​

NameTypeDescription
okbool

Methods​

MethodDescription
to_dict

to_dict​

def to_dict() -> Dict[str, Any]: