def stop_commands_on_host(cohs): groups = CoHManager.setCoHsStateStopped(cohs) session = sqlalchemy.orm.create_session() for cmd_id, count in groups.items(): cmd = session.query(Commands).get(cmd_id) # update stats cmd.sum_running -= count cmd.sum_stopped += count session.add(cmd) session.close()
def stop_commands_on_host(cohs): groups = CoHManager.setCoHsStateStopped(cohs) session = sqlalchemy.orm.create_session() for cmd_id, count in groups.items(): cmd = session.query(Commands).get(cmd_id) # update stats cmd.sum_running -= count cmd.sum_stopped += count session.add(cmd) session.close()
def switch_commands_to_stop(cohs): CoHManager.setCoHsStateStopped(cohs)
def switch_commands_to_stop(cohs): CoHManager.setCoHsStateStopped(cohs)