seguro.commands.scheduler.model

Classes

EventTrigger(*, type)

EventTriggerType(value[, names, module, ...])

JobInfo(*, name, spec[, trigger])

JobSpec(*[, triggers, scale, recreate, build])

ScheduleTrigger(*, type[, interval, ...])

ScheduleTriggerType(value[, names, module, ...])

ScheduleUnit(value[, names, module, ...])

StoreTrigger(*, type[, prefix, initial])

StoreTriggerType(value[, names, module, ...])

TriggerInfo(*, id, type, time[, event, object])

Weekday(value[, names, module, qualname, ...])

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:
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
spec: JobSpec
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:
build: bool
container: Service
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:
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
start_day: Weekday
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:
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:
event: Event | 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
type: StoreTriggerType | ScheduleTriggerType | EventTriggerType
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'