Ejemplo n.º 1
0
def activate():
    config = updateConfig("update")
    if config.disabled:
        logger.warning("Plugin UpdateMgr: disabled by configuration.")
        return False
    if not updateDatabase().activate(config):
        logger.error("UpdateMgr database not activated")
        return False
    return True
Ejemplo n.º 2
0
def activate():
    config = updateConfig("update")
    if config.disabled:
        logger.warning("Plugin UpdateMgr: disabled by configuration.")
        return False
    if not updateDatabase().activate(config):
        logger.error("UpdateMgr database not activated")
        return False
    # Add create update commands in the task manager
    if config.enable_update_commands:
        TaskManager().addTask("update.create_update_commands",
                            (create_update_commands,),
                            cron_expression=config.update_commands_cron)
    return True
Ejemplo n.º 3
0
def activate():
    config = updateConfig("update")
    if config.disabled:
        logger.warning("Plugin UpdateMgr: disabled by configuration.")
        return False
    if not updateDatabase().activate(config):
        logger.error("UpdateMgr database not activated")
        return False

    DashboardManager().register_panel(Panel('product_updates'))

    # Add create update commands in the task manager
    if config.enable_update_commands:
        TaskManager().addTask("update.create_update_commands",
                              (create_update_commands, ),
                              cron_expression=config.update_commands_cron)
    return True
Ejemplo n.º 4
0
def activate():
    config = updateConfig("update")
    if config.disabled:
        logger.warning("Plugin UpdateMgr: disabled by configuration.")
        return False
    if not updateDatabase().activate(config):
        logger.error("UpdateMgr database not activated")
        return False

    DashboardManager().register_panel(Panel('product_updates'))
    DashboardManager().register_panel(Panel('clients_updates'))

    # Add create update commands in the task manager
    if config.enable_update_commands:
        TaskManager().addTask("update.create_update_commands",
                              (create_update_commands,),
                              cron_expression=config.update_commands_cron)
    if config.enable_update_description:
        TaskManager().addTask("add_update_description",
                              (add_update_description,),
                              cron_expression=config.add_update_description_cron)
    return True