Skip to main content

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​

NameTypeDescription
group[group](group.md?sid=celery_canvas_group)Group that is stamped.
headersDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders 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​

NameTypeDescription
group[group](group.md?sid=celery_canvas_group)Group that is stamped.
headersDictPartial 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​

NameTypeDescription
chain[chain](chain.md?sid=celery_canvas_chain)Chain that is stamped.
headersDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders 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​

NameTypeDescription
chain[chain](chain.md?sid=celery_canvas_chain)Chain that is stamped.
headersDictPartial 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​

NameTypeDescription
sig[Signature](signature.md?sid=celery_canvas_signature)Signature that is stamped.
headersDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders 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​

NameTypeDescription
sigchordchord that is stamped.
headerDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders 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​

NameTypeDescription
sigchordchord that is stamped.
headerDictPartial 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​

NameTypeDescription
sigchordchord that is stamped.
headerDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders 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​

NameTypeDescription
callback[Signature](signature.md?sid=celery_canvas_signature)callback that is stamped.
headerDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders 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​

NameTypeDescription
errback[Signature](signature.md?sid=celery_canvas_signature)errback that is stamped.
headerDictPartial headers that could be merged with existing headers.

Returns​

TypeDescription
Dictheaders to update.