Module leapyear._core.async_job

Classes for managing asynchronous jobs in LeapYear Core.

Inspecting Job status

class leapyear._core.async_job.AsyncJobStatus

Result of checking the status of an asynchronous computation.

status

The current status of the job.

Return type

AsyncJobState

result

None if the job is still running, otherwise either the JobResult or a LYCoreException error.

Return type

ResultOrError[JobResult]

start_time

The time the job was started.

Return type

datetime

end_time

The time the job finished, or None if the job is still running.

Return type

Optional[datetime]

property elapsed_time

Return a timedelta representing the amount of time taken by the analysis.

Return type

timedelta

class leapyear._core.async_job.AsyncJobState

The current state of a job.

  • AsyncJobStateRunning

  • AsyncJobStateFinished

  • AsyncJobStateFailed

  • AsyncJobStateCancelled