Beispiel #1
0
    def work(self):
        """ main routine that does the periodical work """

        self.tryReconnect()

        if free_space(self.core.config["general"]["download_folder"]) / 1024 / 1024 < \
                self.core.config["general"]["min_free_space"]:
            self.log.warning(_("Not enough space left on device"))
            self.paused = True

        if self.paused or not self.core.api.isTimeDownload():
            return False

        # at least one thread want reconnect and we are supposed to wait
        if self.core.config['reconnect']['wait'] and self.wantReconnect() > 1:
            return False

        self.assignJobs()
Beispiel #2
0
    def work(self):
        """ main routine that does the periodical work """

        self.tryReconnect()

        if free_space(self.core.config["general"]["download_folder"]) / 1024 / 1024 < \
                self.core.config["general"]["min_free_space"]:
            self.log.warning(_("Not enough space left on device"))
            self.paused = True

        if self.paused or not self.core.api.isTimeDownload():
            return False

        # at least one thread want reconnect and we are supposed to wait
        if self.core.config['reconnect']['wait'] and self.wantReconnect() > 1:
            return False

        self.assignJobs()
Beispiel #3
0
 def freeSpace(self):
     """Available free space at download directory in bytes"""
     return free_space(self.core.config["general"]["download_folder"])
Beispiel #4
0
 def freeSpace(self):
     """Available free space at download directory in bytes"""
     return free_space(self.core.config["general"]["download_folder"])