Skip to main content

Trigger

Trigger is the mutable latest-state row for a trigger. One row per (project, domain, task_name, name); updated in-place on each deploy/activate/delete. Mirrors the pattern used by Action (latest state) + ActionEvent (history).

Attributes

AttributeTypeDescription
IDuintThis attribute stores the unique identifier for the trigger.
ProjectstringThis attribute stores the project name associated with the trigger, forming part of its unique identity.
DomainstringThis attribute stores the domain name associated with the trigger, forming part of its unique identity.
TaskNamestringThis attribute stores the name of the task associated with the trigger, forming part of its unique identity.
NamestringThis attribute stores the name of the trigger, forming part of its unique identity.
LatestRevisionuint64This attribute stores a monotonically increasing counter that is incremented on every write to the trigger.
Spec[]byteThis attribute stores the serialized protobuf specification of the trigger.
AutomationSpec[]byteThis attribute stores the serialized protobuf specification for the automation associated with the trigger.
TaskVersionstringThis attribute stores the denormalized task version for cheap queries without deserializing protos.
ActiveboolThis attribute indicates whether the trigger is active, allowing for cheap queries without deserializing protos.
AutomationTypestringThis attribute stores the type of automation associated with the trigger, allowing for cheap queries without deserializing protos.
DeployedBysql.NullStringThis attribute stores the identity of the user who deployed the trigger.
UpdatedBysql.NullStringThis attribute stores the identity of the user who last updated the trigger.
DeployedAttime.TimeThis attribute stores the timestamp when the trigger was deployed.
UpdatedAttime.TimeThis attribute stores the timestamp when the trigger was last updated.
TriggeredAtsql.NullTimeThis attribute stores the timestamp when the trigger was last activated.
DeletedAtsql.NullTimeThis attribute stores the timestamp when the trigger was deleted.
Descriptionsql.NullStringThis attribute stores an optional description for the trigger.

Methods


ToTaskKey()

@classmethod
def ToTaskKey() - > [TaskKey](taskkey.md?sid=runs_repository_models_taskkey)

Converts the Trigger object's identity fields into a TaskKey, which uniquely identifies the associated task.

Returns

TypeDescription
[TaskKey](taskkey.md?sid=runs_repository_models_taskkey)A TaskKey object representing the unique identifier for the task associated with this trigger.