':param Manager manager: Manager instance.
:param string name: Name of the task.
:param dict config: Task configuration.
:param options: dict or argparse namespace with options for this task
:param output: A filelike that all logs and stdout will be sent to for this task.
:param loglevel: Custom loglevel, only log messages at this level will be sent to `output`
:param priority: If multiple tasks are waiting to run, the task with the lowest priority will be run first.
The default is 0, if the cron option is set though, the default is lowered to 10.
:param suppress_warnings: Allows suppressing log warning about missing plugin in key phases'

def __init__(self, manager, name, config=None, options=None, output=None, loglevel=None, priority=None, suppress_warnings=None):

    self.name = str(name)
    self.id = u''.join((random.choice(string.digits) for _ in range(6)))
    self.manager = manager
    if (config is None):
        config = manager.config[u'tasks'].get(name, {})
    self.config = copy.deepcopy(config)
    self.prepared_config = None
    if (options is None):
        options = copy.copy(self.manager.options.execute)
    elif isinstance(options, dict):
        options_namespace = copy.copy(self.manager.options.execute)
        options_namespace.__dict__.update(options)
        options = options_namespace
    if (not hasattr(options, u'allow_manual')):
        setattr(options, u'allow_manual', False)
    self.options = options
    self.output = output
    self.loglevel = loglevel
    self.suppress_warnings = (suppress_warnings or [])
    if (priority is None):
        self.priority = (10 if self.options.cron else 0)
    else:
        self.priority = priority
    self.priority = priority
    self._count = next(self._counter)
    self.finished_event = threading.Event()
    self.simple_persistence = SimpleTaskPersistence(self)
    self._rerun_count = 0
    self._max_reruns = Task.RERUN_DEFAULT
    self._reruns_locked = False
    self.config_modified = None
    self.enabled = (not self.name.startswith(u'_'))
    self.aborted = False
    self.abort_reason = None
    self.silent_abort = False
    self.session = None
    self.requests = requests.Session()
    self._all_entries = EntryContainer()
    self._rerun = False
    self.disabled_phases = []
    self.current_phase = None
    self.current_plugin = None
