batch.messages package¶
Submodules¶
batch.messages.create_batch_recipes module¶
Defines a command message that creates batch recipes
-
class
batch.messages.create_batch_recipes.
CreateBatchRecipes
¶ Bases:
messaging.messages.message.CommandMessage
Command message that creates batch recipes
-
execute
()¶
-
static
from_json
(json_dict)¶
-
to_json
()¶
-
-
batch.messages.create_batch_recipes.
create_batch_recipes_message
(batch_id)¶ Creates a message to create the recipes for the given batch
Parameters: batch_id (int) – The batch ID Returns: The message Return type: batch.messages.create_batch_recipes.CreateBatchRecipes
batch.messages.update_batch_metrics module¶
Defines a command message that updates batch metrics
-
class
batch.messages.update_batch_metrics.
UpdateBatchMetrics
¶ Bases:
messaging.messages.message.CommandMessage
Command message that updates batch metrics
-
add_batch
(batch_id)¶ Adds the given batch ID to this message
Parameters: batch_id (int) – The batch ID
-
can_fit_more
()¶ Indicates whether more batches can fit in this message
Returns: True if more batches can fit, False otherwise Return type: bool
-
execute
()¶
-
static
from_json
(json_dict)¶
-
to_json
()¶
-
-
batch.messages.update_batch_metrics.
create_update_batch_metrics_messages
(batch_ids)¶ Creates messages to update the metrics for the given batches
Parameters: batch_ids ( list()
) – The batch IDsReturns: The list of messages Return type: list()