Wait for remoteUpdate() completion in remoteComplete()
Showing 1 of 2 files from the diff.
Other files ignored by Codecov
@@ -373,7 +373,6 @@
Loading
373 | 373 | self.updates[key] = [] |
|
374 | 374 | self.updates[key].append(value) |
|
375 | 375 | ||
376 | - | @util.deferredLocked('loglock') |
|
377 | 376 | @defer.inlineCallbacks |
|
378 | 377 | def remoteComplete(self, maybeFailure): |
|
379 | 378 | if self._startTime and self._remoteElapsed: |
@@ -384,21 +383,26 @@
Loading
384 | 383 | if key in ['stdout', 'stderr', 'header']: |
|
385 | 384 | whole_line = lbf.flush() |
|
386 | 385 | if whole_line is not None: |
|
387 | - | self.remoteUpdate(key, whole_line, True) |
|
386 | + | yield self.remoteUpdate(key, whole_line, True) |
|
388 | 387 | else: |
|
389 | 388 | logname = key |
|
390 | 389 | whole_line = lbf.flush() |
|
391 | 390 | value = (logname, whole_line) |
|
392 | 391 | if whole_line is not None: |
|
393 | - | self.remoteUpdate("log", value, True) |
|
394 | - | ||
395 | - | for name, loog in self.logs.items(): |
|
396 | - | if self._closeWhenFinished[name]: |
|
397 | - | if maybeFailure: |
|
398 | - | yield loog.addHeader(f"\nremoteFailed: {maybeFailure}") |
|
399 | - | else: |
|
400 | - | log.msg(f"closing log {loog}") |
|
401 | - | yield loog.finish() |
|
392 | + | yield self.remoteUpdate("log", value, True) |
|
393 | + | ||
394 | + | try: |
|
395 | + | yield self.loglock.acquire() |
|
396 | + | for name, loog in self.logs.items(): |
|
397 | + | if self._closeWhenFinished[name]: |
|
398 | + | if maybeFailure: |
|
399 | + | yield loog.addHeader(f"\nremoteFailed: {maybeFailure}") |
|
400 | + | else: |
|
401 | + | log.msg(f"closing log {loog}") |
|
402 | + | yield loog.finish() |
|
403 | + | finally: |
|
404 | + | yield self.loglock.release() |
|
405 | + | ||
402 | 406 | if maybeFailure: |
|
403 | 407 | # Message Pack protocol can not send an exception object back to the master, so |
|
404 | 408 | # exception information is sent as a string |
Files | Coverage |
---|---|
master/buildbot | 92.50% |
worker/buildbot_worker | 86.35% |
Project Totals (345 files) | 92.05% |
3095113387
3095113387
Untitled
Untitled
3095113387
3095113387
3095113387
3095113387
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.