Created Time Conditions (autotransform.step.condition.created)

The implementation for the CreatedAgoCondition.

class autotransform.step.condition.created.CreatedAgoCondition(*, comparison: ComparisonType, value: int)

Bases: SortableComparisonCondition[int]

A condition which checks how long ago a Change was created against the supplied time, all in seconds, using the supplied comparison.

comparison

The type of comparison to perform.

Type

ComparisonType

value

The number of seconds to compare against.

Type

int

name

The name of the Component.

Type

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) int

Gets how long ago the Change was created.

Parameters

change (Change) – The Change the Condition is checking.

Returns

How long ago the Change was created.

Return type

int

name: ClassVar[ConditionName] = 'created_ago'
value: int