summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-05-30 15:50:38 +0300
committerLars-Dominik Braun <lars@6xq.net>2019-05-30 15:50:38 +0300
commit2bc0e646162956cc5a8c0e9dff73b948ebe5ba5b (patch)
tree1bc2c8a007d91e4ba402b9c6e0faffff4a7d9973 /crocoite
parent42b93832f786c1db33db711c831eca89ee325442 (diff)
downloadcrocoite-2bc0e646162956cc5a8c0e9dff73b948ebe5ba5b.tar.gz
crocoite-2bc0e646162956cc5a8c0e9dff73b948ebe5ba5b.tar.bz2
crocoite-2bc0e646162956cc5a8c0e9dff73b948ebe5ba5b.zip
controller: Fix -recursive stats
have previously included running jobs. Remove them.
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/controller.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/crocoite/controller.py b/crocoite/controller.py
index d84878a..b531491 100644
--- a/crocoite/controller.py
+++ b/crocoite/controller.py
@@ -400,9 +400,11 @@ class RecursiveController:
async def run (self):
def log ():
+ # self.have includes running jobs
self.logger.info ('recursing',
uuid='5b8498e4-868d-413c-a67e-004516b8452c',
- pending=len (self.pending), have=len (self.have),
+ pending=len (self.pending),
+ have=len (self.have)-len(self.running),
running=len (self.running))
try:
@@ -428,7 +430,8 @@ class RecursiveController:
except asyncio.CancelledError:
self.logger.info ('cancel',
uuid='d58154c8-ec27-40f2-ab9e-e25c1b21cd88',
- pending=len (self.pending), have=len (self.have),
+ pending=len (self.pending),
+ have=len (self.have)-len (self.running),
running=len (self.running))
finally:
done = await asyncio.gather (*self.running,