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
| Attribute | Type | Description |
|---|---|---|
| stamp | dict = {"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
| Name | Type | Description |
|---|---|---|
| sig | Any | The original task signature being visited and replaced. |
| **headers | dict | Additional metadata headers associated with the task signature. |
Returns
| Type | Description |
|---|---|
dict | A dictionary containing the replacement task metadata defined in the stamp attribute. |