[ARVADOS] updated: f389a552e9b81de0e2030fe2fddc4852b33f63cc
Git user
git at public.curoverse.com
Fri May 5 11:54:20 EDT 2017
Summary of changes:
services/crunch-run/logging.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
via f389a552e9b81de0e2030fe2fddc4852b33f63cc (commit)
from e4f03346d4498a77d252d2ffb08d1e0246785b5e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f389a552e9b81de0e2030fe2fddc4852b33f63cc
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri May 5 11:54:13 2017 -0400
8019: Make flush channel buffered again (because we want to be able to do back-to-back flushes).
Fix "> crunchLogBytesPerEvent" to ">= crunchLogBytesPerEvent" for consistency.
diff --git a/services/crunch-run/logging.go b/services/crunch-run/logging.go
index 96feb5f..816802b 100644
--- a/services/crunch-run/logging.go
+++ b/services/crunch-run/logging.go
@@ -175,7 +175,7 @@ func ReadWriteLines(in io.Reader, writer io.Writer, done chan<- bool) {
// at most once per "crunchLogSecondsBetweenEvents" seconds.
func NewThrottledLogger(writer io.WriteCloser) *ThrottledLogger {
tl := &ThrottledLogger{}
- tl.flush = make(chan struct{})
+ tl.flush = make(chan struct{}, 1)
tl.stopped = make(chan struct{})
tl.stopping = make(chan struct{})
tl.writer = writer
@@ -261,7 +261,7 @@ func (arvlog *ArvLogWriter) Write(p []byte) (n int, err error) {
}
}
- if (int64(arvlog.bufToFlush.Len()) > crunchLogBytesPerEvent ||
+ if (int64(arvlog.bufToFlush.Len()) >= crunchLogBytesPerEvent ||
(now.Sub(arvlog.bufFlushedAt) >= crunchLogSecondsBetweenEvents) ||
arvlog.closing) && (arvlog.bufToFlush.Len() > 0) {
// write to API
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list