StampingVisitor
Stamping API. A class that provides a stamping API possibility for canvas primitives. If you want to implement stamping behavior for a canvas primitive override method that represents it.
Methods
on_group_start()
@classmethod
def on_group_start(
group: [group](group.md?sid=celery_canvas_group),
headers: Dict
) - > Dict
Method that is called on group stamping start.
Parameters
| Name | Type | Description |
|---|---|---|
| group | [group](group.md?sid=celery_canvas_group) | Group that is stamped. |
| headers | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |
on_group_end()
@classmethod
def on_group_end(
group: [group](group.md?sid=celery_canvas_group),
headers: Dict
)
Method that is called on group stamping end.
Parameters
| Name | Type | Description |
|---|---|---|
| group | [group](group.md?sid=celery_canvas_group) | Group that is stamped. |
| headers | Dict | Partial headers that could be merged with existing headers. |
on_chain_start()
@classmethod
def on_chain_start(
chain: [chain](chain.md?sid=celery_canvas_chain),
headers: Dict
) - > Dict
Method that is called on chain stamping start.
Parameters
| Name | Type | Description |
|---|---|---|
| chain | [chain](chain.md?sid=celery_canvas_chain) | Chain that is stamped. |
| headers | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |
on_chain_end()
@classmethod
def on_chain_end(
chain: [chain](chain.md?sid=celery_canvas_chain),
headers: Dict
)
Method that is called on chain stamping end.
Parameters
| Name | Type | Description |
|---|---|---|
| chain | [chain](chain.md?sid=celery_canvas_chain) | Chain that is stamped. |
| headers | Dict | Partial headers that could be merged with existing headers. |
on_signature()
@classmethod
def on_signature(
sig: [Signature](signature.md?sid=celery_canvas_signature),
headers: Dict
) - > Dict
Method that is called on signature stamping.
Parameters
| Name | Type | Description |
|---|---|---|
| sig | [Signature](signature.md?sid=celery_canvas_signature) | Signature that is stamped. |
| headers | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |
on_chord_header_start()
@classmethod
def on_chord_header_start(
sig: chord,
header: Dict
) - > Dict
Method that is called on сhord header stamping start.
Parameters
| Name | Type | Description |
|---|---|---|
| sig | chord | chord that is stamped. |
| header | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |
on_chord_header_end()
@classmethod
def on_chord_header_end(
sig: chord,
header: Dict
)
Method that is called on сhord header stamping end.
Parameters
| Name | Type | Description |
|---|---|---|
| sig | chord | chord that is stamped. |
| header | Dict | Partial headers that could be merged with existing headers. |
on_chord_body()
@classmethod
def on_chord_body(
sig: chord,
header: Dict
) - > Dict
Method that is called on chord body stamping.
Parameters
| Name | Type | Description |
|---|---|---|
| sig | chord | chord that is stamped. |
| header | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |
on_callback()
@classmethod
def on_callback(
callback: [Signature](signature.md?sid=celery_canvas_signature),
header: Dict
) - > Dict
Method that is called on callback stamping.
Parameters
| Name | Type | Description |
|---|---|---|
| callback | [Signature](signature.md?sid=celery_canvas_signature) | callback that is stamped. |
| header | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |
on_errback()
@classmethod
def on_errback(
errback: [Signature](signature.md?sid=celery_canvas_signature),
header: Dict
) - > Dict
Method that is called on errback stamping.
Parameters
| Name | Type | Description |
|---|---|---|
| errback | [Signature](signature.md?sid=celery_canvas_signature) | errback that is stamped. |
| header | Dict | Partial headers that could be merged with existing headers. |
Returns
| Type | Description |
|---|---|
Dict | headers to update. |