Condition
executor.engine.job.condition.Condition
dataclass
Base class for condition
Source code in executor/engine/job/condition.py
executor.engine.job.condition.AfterAnother
dataclass
Bases: Condition
Condition that the job is executed after another job is done/failed/cancelled.
Attributes:
| Name | Type | Description |
|---|---|---|
job_id |
str
|
The id of the job. |
statuses |
Iterable[JobStatusType]
|
The statuses of the job that satisfy the condition. |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.AfterOthers
dataclass
Bases: Condition
Condition that the job is executed after other jobs are done/failed/cancelled.
Attributes:
| Name | Type | Description |
|---|---|---|
job_ids |
List[str]
|
The ids of the jobs. |
statuses |
Iterable[JobStatusType]
|
The statuses of the jobs that satisfy the condition. |
mode |
Literal['all', 'any']
|
The mode of the condition. If it is 'all', the job is executed after all other jobs are done/failed/cancelled. If it is 'any', the job is executed after any other job is done/failed/cancelled. |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.Combination
dataclass
executor.engine.job.condition.AllSatisfied
dataclass
Bases: Combination
Condition that the job is executed after all sub-conditions are satisfied.
Attributes:
| Name | Type | Description |
|---|---|---|
conditions |
List[Condition]
|
The sub-conditions. |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.AnySatisfied
dataclass
Bases: Combination
Condition that the job is executed after any sub-condition is satisfied.
Attributes:
| Name | Type | Description |
|---|---|---|
conditions |
List[Condition]
|
The sub-conditions. |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.TimeCondition
dataclass
executor.engine.job.condition.EveryPeriod
dataclass
Bases: TimeCondition
Every period.
Attributes:
| Name | Type | Description |
|---|---|---|
period_str |
str
|
The period string. format: "1d", "1h", "1m", "1s" |
last_submitted_at |
Optional[datetime]
|
The last submitted time. |
immediate |
bool
|
Whether to submit the job immediately. |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.AfterClock
dataclass
Bases: TimeCondition
After a specific clock.
Attributes:
| Name | Type | Description |
|---|---|---|
time_str |
str
|
The time string. format: "12:00", "12:00:00" |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.BeforeClock
dataclass
Bases: TimeCondition
Before a specific clock.
Attributes:
| Name | Type | Description |
|---|---|---|
time_str |
str
|
The time string. format: "12:00", "12:00:00" |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.AfterWeekday
dataclass
Bases: TimeCondition
After a specific weekday.
Attributes:
| Name | Type | Description |
|---|---|---|
weekday_str |
str
|
The weekday string. format: "monday", "mon", "tuesday", "tue", "wednesday", "wed", "thursday", "thu", "friday", "fri", "saturday", "sat", "sunday", "sun" |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.BeforeWeekday
dataclass
Bases: TimeCondition
Before a specific weekday.
Attributes:
| Name | Type | Description |
|---|---|---|
weekday_str |
str
|
The weekday string. format: "monday", "mon", "tuesday", "tue", "wednesday", "wed", "thursday", "thu", "friday", "fri", "saturday", "sat", "sunday", "sun" |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.AfterTimepoint
dataclass
Bases: TimeCondition
After a timepoint.
Attributes:
| Name | Type | Description |
|---|---|---|
timepoint |
datetime
|
The timepoint. |
Source code in executor/engine/job/condition.py
executor.engine.job.condition.BeforeTimepoint
dataclass
Bases: TimeCondition
Before a timepoint.
Attributes:
| Name | Type | Description |
|---|---|---|
timepoint |
datetime
|
The timepoint. |