Merge pull request #44 from codingo/progress-bar-dev

Progress bar development with bug fixes
This commit is contained in:
Michael Skelton
2019-06-04 15:08:19 +10:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -1,2 +1 @@
__version__ = '1.5.0'
__version__ = '1.5.1'

View File

@@ -19,13 +19,14 @@ class Worker(object):
if self.tqdm:
self.tqdm.update(1)
# run task
self.run_task(task)
self.run_task(task, self.tqdm)
except IndexError:
break
@staticmethod
def run_task(task):
subprocess.call(task, shell=True)
def run_task(task, t):
s = subprocess.Popen(task, shell=True, stdout=subprocess.PIPE)
t.write(s.stdout.readline().decode("utf-8"))
class Pool(object):