def __init__(self, username): EventsObject.__init__(self) self._username = username self._account_data_file = os.path.join(os.getenv("HOME"), ".local", "share", "fever", "accounts", self._username + ".db") self._account_data_db = FeverAccountDB(self._account_data_file) self._sync_state_lock = threading.Lock() self._sync_state = "" self._sync_running_lock = threading.Lock() self._sync_running = False self._restart_sync = False
def __init__(self, task_id, task_type, **params): EventsObject.__init__(self) threading.Thread.__init__(self, None, self._run, None, (task_type,), params) self.task_id = task_id self.ended = threading.Event() self.success = threading.Event() self.status_changed = threading.Event() self.error = ThreadedVar(None) self.status = ThreadedVar(None) self.task_type = task_type self.params = params
def __init__(self, task_id, task_type, **params): EventsObject.__init__(self) threading.Thread.__init__(self, None, self._run, None, (task_type, ), params) self.task_id = task_id self.ended = threading.Event() self.success = threading.Event() self.status_changed = threading.Event() self.error = ThreadedVar(None) self.status = ThreadedVar(None) self.task_type = task_type self.params = params
def __init__(self): EventsObject.__init__(self) self._init_debconf() logging.debug("Initializing cache") self._cache = apt.Cache() self._tasks = {} self._queue = [] self._task_id = 0 self._queue_lock = threading.Lock() self._completed_operations_count = 0 self._running = False self._running_lock = threading.Lock() self._apt_thread = None