Skip to main content

StampOnReplace

This class is a specialized visitor designed to apply a specific stamp to task signatures during a replacement operation. It overrides the signature processing logic to return a predefined dictionary, effectively marking replaced tasks with a unique identifier.

Attributes

AttributeTypeDescription
stampdict = {"StampOnReplace": "This is the replaced task"}A dictionary containing the replacement task metadata used to overwrite existing signatures during the visitation process.

Constructor

Signature

def StampOnReplace() - > null

Methods


on_signature()

@classmethod
def on_signature(
sig: Any,
**headers: dict
) - > dict

Returns a predefined stamp dictionary to replace the existing task signature.

Parameters

NameTypeDescription
sigAnyThe original task signature being visited and replaced.
**headersdictAdditional metadata headers associated with the task signature.

Returns

TypeDescription
dictA dictionary containing the replacement task metadata defined in the stamp attribute.