Commit d44eb244 authored by Antoine Millet's avatar Antoine Millet
Browse files

Added a proxy to the rpc on the client classes

parent 7ad24191
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ import logging

from datetime import datetime

from sjrpc.utils import ConnectionProxy

from ccserver.handlers import CCHandler, listed
from ccserver.exceptions import RightError
from ccserver.db import RemoteTag
@@ -95,6 +97,7 @@ class Client(object):
        self._connection = connection
        self._tql_object = tql_object
        self._handler = self.RPC_HANDLER(self)
        self._proxy = ConnectionProxy(self._connection.rpc)
        self._last_action = datetime.now()
        self._connection_date = datetime.now()

@@ -123,6 +126,12 @@ class Client(object):
    # Properties
    #

    @property
    def proxy(self):
        """ Return a proxy to the rpc.
        """
        return self._proxy

    @property
    def object(self):
        """ Return the tql object of this client.