seguro.commands.scheduler.model¶
Classes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class seguro.commands.scheduler.model.EventTrigger(*, type)[source]¶
Bases:
BaseModel
- Parameters:
type (EventTriggerType)
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'type': FieldInfo(annotation=EventTriggerType, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- type: EventTriggerType¶
- class seguro.commands.scheduler.model.EventTriggerType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
- SHUTDOWN = 'shutdown'¶
- STARTUP = 'startup'¶
- class seguro.commands.scheduler.model.JobInfo(*, name, spec, trigger=None)[source]¶
Bases:
BaseModel
- Parameters:
name (str)
spec (JobSpec)
trigger (TriggerInfo | None)
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True), 'spec': FieldInfo(annotation=JobSpec, required=True), 'trigger': FieldInfo(annotation=Union[TriggerInfo, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str¶
- trigger: TriggerInfo | None¶
- property trigger_obj¶
- class seguro.commands.scheduler.model.JobSpec(*, triggers=None, scale=1, recreate=False, build=False, container)[source]¶
Bases:
BaseModel
- Parameters:
triggers (dict[str, EventTrigger | StoreTrigger | ScheduleTrigger] | None)
scale (int)
recreate (bool)
build (bool)
container (Service)
- build: bool¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'build': FieldInfo(annotation=bool, required=False, default=False), 'container': FieldInfo(annotation=Service, required=True), 'recreate': FieldInfo(annotation=bool, required=False, default=False), 'scale': FieldInfo(annotation=int, required=False, default=1), 'triggers': FieldInfo(annotation=Union[dict[str, Union[EventTrigger, StoreTrigger, ScheduleTrigger]], NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- recreate: bool¶
- scale: int¶
- triggers: dict[str, EventTrigger | StoreTrigger | ScheduleTrigger] | None¶
- class seguro.commands.scheduler.model.ScheduleTrigger(*, type, interval=1, interval_to=None, once=False, at=None, until=None, unit=ScheduleUnit.SECONDS, start_day=Weekday.MONDAY)[source]¶
Bases:
BaseModel
- Parameters:
type (ScheduleTriggerType)
interval (int)
interval_to (int | None)
once (bool)
at (str | None)
until (datetime | time | timedelta | None)
unit (ScheduleUnit)
start_day (Weekday)
- at: str | None¶
- interval: int¶
- interval_to: int | None¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'at': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, metadata=[_PydanticGeneralMetadata(pattern='\\d{2}:\\d{2}(:\\d{2})?|:\\d{2}')]), 'interval': FieldInfo(annotation=int, required=False, default=1), 'interval_to': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'once': FieldInfo(annotation=bool, required=False, default=False), 'start_day': FieldInfo(annotation=Weekday, required=False, default=<Weekday.MONDAY: 'monday'>), 'type': FieldInfo(annotation=ScheduleTriggerType, required=True), 'unit': FieldInfo(annotation=ScheduleUnit, required=False, default=<ScheduleUnit.SECONDS: 'seconds'>), 'until': FieldInfo(annotation=Union[datetime, time, timedelta, NoneType], required=False, default=None)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- once: bool¶
- type: ScheduleTriggerType¶
- unit: ScheduleUnit¶
- until: datetime | time | timedelta | None¶
- class seguro.commands.scheduler.model.ScheduleTriggerType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
- SCHEDULE = 'schedule'¶
- class seguro.commands.scheduler.model.ScheduleUnit(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
- DAYS = 'days'¶
- HOURS = 'hours'¶
- MINUTES = 'minutes'¶
- SECONDS = 'seconds'¶
- WEEKS = 'weeks'¶
- class seguro.commands.scheduler.model.StoreTrigger(*, type, prefix='/', initial=False)[source]¶
Bases:
BaseModel
- Parameters:
type (StoreTriggerType)
prefix (str)
initial (bool)
- initial: bool¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'initial': FieldInfo(annotation=bool, required=False, default=False), 'prefix': FieldInfo(annotation=str, required=False, default='/'), 'type': FieldInfo(annotation=StoreTriggerType, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- prefix: str¶
- type: StoreTriggerType¶
- class seguro.commands.scheduler.model.StoreTriggerType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
- CREATED = 'created'¶
- MODIFIED = 'modified'¶
- REMOVED = 'removed'¶
- class seguro.commands.scheduler.model.TriggerInfo(*, id, type, time, event=None, object=None)[source]¶
Bases:
BaseModel
- Parameters:
id (str)
type (StoreTriggerType | ScheduleTriggerType | EventTriggerType)
time (datetime)
event (Event | None)
object (str | None)
- id: str¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'event': FieldInfo(annotation=Union[Event, NoneType], required=False, default=None), 'id': FieldInfo(annotation=str, required=True), 'object': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'time': FieldInfo(annotation=datetime, required=True), 'type': FieldInfo(annotation=Union[StoreTriggerType, ScheduleTriggerType, EventTriggerType], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- object: str | None¶
- time: datetime¶
- class seguro.commands.scheduler.model.Weekday(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
- FRIDAY = 'friday'¶
- MONDAY = 'monday'¶
- SATURDAY = 'saturday'¶
- SUNDAY = 'sunday'¶
- THURSDAY = 'thursday'¶
- TUESDAY = 'tuesday'¶
- WEDNESDAY = 'wednesday'¶