The watcher.decision_engine.planner.weight Module

class watcher.decision_engine.planner.weight.WeightPlanner(config)[source]

Bases: watcher.decision_engine.planner.base.BasePlanner

Weight planner implementation

This implementation builds actions with parents in accordance with weights. Set of actions having a higher weight will be scheduled before the other ones. There are two config options to configure: action_weights and parallelization.

Limitations

  • This planner requires to have action_weights and parallelization configs tuned well.
static chunkify(lst, n)[source]

Yield successive n-sized chunks from lst.

compute_action_graph(sorted_weighted_actions)[source]
create_action_plan(context, audit_id, solution)[source]
create_scheduled_actions(graph)[source]
classmethod get_config_opts()[source]
get_sorted_actions_by_weight(context, action_plan, solution)[source]
schedule(context, audit_id, solution)[source]