Type part of a name or a dotted path
Small package with sphinx-style docstrings.
Exists so the parser tests cover the reStructuredText field list syntax
(:param x:, :returns:, :raises:).
Classes
| Name | Description |
|---|
Job | A unit of queued work. |
|---|
Functions
| Name | Description |
|---|
submit | Queue a job for execution. |
|---|
Jobclass#
class Job(label: str, priority: int = 0)
Parameters
| Name | Type | Default | Description |
|---|
label | str | required | Human readable job label. |
|---|
priority | int | 0 | Queue priority, higher runs first. |
|---|
labelattributeinstance attribute#
label = label
priorityattributeinstance attribute#
priority = priority
describemethod#
def describe() -> str
Returns
str- A single line of plain text.
submitfunction#
def submit(job: Job, *, dry_run: bool = False) -> str
Queue a job for execution.
Parameters
| Name | Type | Default | Description |
|---|
job | Job | required | The job to queue. |
|---|
dry_run | bool | False | When true, validate without queueing. |
|---|
Returns
str- The identifier assigned to the job.
Raises
ValueError- If the job has an empty label.