コード例 #1
0
ファイル: worker_avatar.py プロジェクト: brianmartin/Pydra
    def __init__(self, server, name):
        self.server = server
        self.name = name

        node_key = server.priv_key
        master_key = server.priv_key

        ModuleAvatar.__init__(self, server.manager._remotes['WORKER'])
        RSAAvatar.__init__(self, master_key, None, node_key, server.worker_authenticated, True)
コード例 #2
0
    def __init__(self, server, name):
        self.server = server
        self.name = name

        node_key = server.priv_key
        master_key = server.priv_key

        try:
            remotes = server.manager._remotes['WORKER']
        except KeyError:
            # this shouldn't happen, but there are no functions exposed for
            # the worker to use.
            remotes = []
            logger.warning("There are no remotes configured for Workers.  The connected worker will not be allowed to do anything")

        ModuleAvatar.__init__(self, remotes)
        RSAAvatar.__init__(self, master_key, None, node_key, server.worker_authenticated, True)