✏️Server Types
Enroll callback Tasks
Exemple de Enroll Callback Task
@fabric_task()
def template_enroll_callback_task(
cnx, host_obj,
step:str,
_imq_logger=None
):
""" Template Enroll callback task
:param step: The step whose end triggered this task:
any of 'begin', 'apt_update_upgrade', 'install_mpy_required_packages',
'ufw_configure', 'collect_facts' and 'reboot'.
:returns: any (not used)
Database Environment is flushed and commited at Task end so you don't need
to do it.
"""
odoo_env = host_obj.env
_commit = odoo_env.cr.commit
_task_logger = _imq_logger or _logger
_task_logger.info("Processing Enrollment step '%s' on host:'%s'.", step, host_obj)
# ...
return True
Mise en oeuvre
Last updated