Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/citrine/jobs/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@


class JobSubmissionResponse(Resource['JobSubmissionResponse']):
"""A response to a submit-job request for the job submission framework.
"""Response from submitting an asynchronous job to the platform.

Returned by operations that trigger server-side work (e.g.,
ingestion, table building). Use the ``job_id`` to poll for
completion status.

Attributes
----------
job_id : UUID
Unique identifier for tracking the submitted job.

This is returned as a successful response from the remote service.
"""

job_id = properties.UUID("job_id")
Expand Down
19 changes: 18 additions & 1 deletion src/citrine/jobs/waiting.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""Utilities for waiting on asynchronous platform operations.

These functions poll the platform at a configurable interval
until an asynchronous operation (predictor training, workflow
validation, design execution) completes or a timeout is reached.

"""
import time
from pprint import pprint
from typing import Union
Expand All @@ -11,7 +18,17 @@


class ConditionTimeoutError(RuntimeError):
"""Error that is raised when timeout is reached but the checked condition is still False."""
"""The client-side polling timeout was exceeded.

Raised when an asynchronous operation (e.g. predictor
training, design execution) has not completed within the
specified ``timeout`` seconds. The server-side operation
continues running independently of this client timeout.

Increase the ``timeout`` parameter to wait longer, or
poll the resource status manually.

"""

pass

Expand Down
Loading