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

Added clients jobs lock.

parent a2a08ed4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
#!/usr/bin/env python
#coding=utf8

from threading import RLock
from datetime import datetime

class CCClient(object):
@@ -25,6 +26,9 @@ class CCClient(object):
        # The date of connection of the client:
        self._connection_date = datetime.now()

        # Jobs lock for this client:
        self.lock = RLock()

    def get_uptime(self):
        '''
        Get the uptime of the client connection in seconds.