worker.strategy

Task execution strategy (optimization).

Module Contents

Functions

hybrid_to_proto2(message,body) Create a fresh protocol 2 message from a hybrid protocol 1/2 message.
proto1_to_proto2(message,body) Convert Task message protocol 1 arguments to protocol 2.
default(task,app,consumer,info=None,error=None,task_reserved=task_reserved,to_system_tz=None,bytes=bytes,buffer_t=buffer_t,proto1_to_proto2=proto1_to_proto2) Default task execution strategy.
hybrid_to_proto2(message, body)

Create a fresh protocol 2 message from a hybrid protocol 1/2 message.

proto1_to_proto2(message, body)

Convert Task message protocol 1 arguments to protocol 2.

Returns:
Tuple: of (body, headers, already_decoded_status, utc)
default(task, app, consumer, info=None, error=None, task_reserved=task_reserved, to_system_tz=None, bytes=bytes, buffer_t=buffer_t, proto1_to_proto2=proto1_to_proto2)

Default task execution strategy.

Note:
Strategies are here as an optimization, so sadly it’s not very easy to override.