예제 #1
0
    def work(self):
        while True:
            fetch.wait(self.timeout)

            if shutting_down.is_set():
                log.info("Stop fetch worker")
                break

            self.fetch()
예제 #2
0
파일: fetch.py 프로젝트: calind/gitfs
    def run(self):
        while True:
            fetch.wait(self.timeout)

            if shutting_down.is_set():
                log.info("Stop fetch worker")
                break

            self.fetch()
예제 #3
0
파일: fetch.py 프로젝트: krodyrobi/gitfs
    def work(self):
        while True:
            timeout = self.timeout
            if idle.is_set():
                timeout = self.idle_timeout

            fetch.wait(timeout)

            if shutting_down.is_set():
                log.info("Stop fetch worker")
                break

            self.fetch()
예제 #4
0
파일: fetch.py 프로젝트: rm3l/gitfs
    def work(self):
        while True:
            timeout = self.timeout
            if idle.is_set():
                timeout = self.idle_timeout

            fetch.wait(timeout)

            if shutting_down.is_set():
                log.info("Stop fetch worker")
                break

            self.fetch()
예제 #5
0
파일: fetch.py 프로젝트: tuxxon/gitfs
    def work(self):
        while True:
            timeout = self.timeout
            if idle.is_set():
                timeout = self.idle_timeout

            log.debug("Wait for {}".format(timeout))
            fetch.wait(timeout)

            if shutting_down.is_set():
                log.info("Stop fetch worker")
                break

            self.fetch()
예제 #6
0
파일: sync.py 프로젝트: calind/gitfs
    def run(self):
        while True:
            if shutting_down.is_set():
                log.info("Stop sync worker")
                break

            try:
                job = self.commit_queue.get(timeout=self.timeout, block=True)
                if job['type'] == 'commit':
                    self.commits.append(job)
                log.debug("Got a commit job")
            except Empty:
                log.debug("Nothing to do right now, going idle")
                self.on_idle()
예제 #7
0
파일: fetch.py 프로젝트: HWL-RobAt/gitfs
    def work(self):
        while True:
            timeout = self.timeout
            if idle.is_set():
                timeout = self.idle_timeout

            log.debug("Wait for {}".format(timeout))
            fetch.wait(timeout)

            if shutting_down.is_set():
                log.info("Stop fetch worker")
                break

            self.fetch()
예제 #8
0
파일: sync.py 프로젝트: shaded-enmity/gitfs
    def work(self):
        while True:
            if shutting_down.is_set():
                log.info("Stop sync worker")
                break

            try:
                job = self.commit_queue.get(timeout=self.timeout, block=True)
                if job['type'] == 'commit':
                    self.commits.append(job)
                log.debug("Got a commit job")
            except Empty:
                log.debug("Nothing to do right now, going idle")
                self.on_idle()
예제 #9
0
파일: sync.py 프로젝트: Marius786/gitfs
    def work(self):
        idle_times = 0
        while True:
            if shutting_down.is_set():
                log.info("Stop sync worker")
                break

            try:
                job = self.commit_queue.get(timeout=self.timeout, block=True)
                if job['type'] == 'commit':
                    self.commits.append(job)
                log.debug("Got a commit job")

                idle_times = 0
                idle.clear()
            except Empty:
                log.debug("Nothing to do right now, going idle")

                if idle_times > self.min_idle_times:
                    idle.set()

                idle_times += 1
                self.on_idle()
예제 #10
0
    def work(self):
        idle_times = 0
        while True:
            if shutting_down.is_set():
                log.info("Stop sync worker")
                break

            try:
                job = self.commit_queue.get(timeout=self.timeout, block=True)
                if job["type"] == "commit":
                    self.commits.append(job)
                log.debug("Got a commit job")

                idle_times = 0
                idle.clear()
            except Empty:
                log.debug("Nothing to do right now, going idle")

                if idle_times > self.min_idle_times:
                    idle.set()

                idle_times += 1
                self.on_idle()