Пример #1
0
    def generate_tasks_from_policies(self, clear=False):
        from autotasks.tasks import delete_win_task_schedule
        from automation.models import Policy

        # Clear agent tasks managed by policy
        if clear:
            for task in self.autotasks.filter(managed_by_policy=True):
                delete_win_task_schedule.delay(task.pk)

        # Generate tasks based on policies
        Policy.generate_policy_tasks(self)
Пример #2
0
    def generate_tasks_from_policies(self):
        from automation.models import Policy

        # Generate tasks based on policies
        Policy.generate_policy_tasks(self)