Ubuntu Pastebin

Paste from TheMue at Thu, 30 Jul 2015 12:20:07 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
		logger.Debugf("LIFECYCLE WATCHER %v HAS VALUES %v", w.collName, values)
		select {
		case <-w.tomb.Dying():
			return tomb.ErrDying
		case <-w.st.watcher.Dead():
			return stateWatcherDeadError(w.st.watcher.Err())
		case ch := <-in:
			// TODO(mue) Remove after debugging!
			logger.Debugf("LIFECYCLE WATCHER %v RECEIVED %v", w.collName, ch)
			updates, ok := collect(ch, in, w.tomb.Dying())
			// TODO(mue) Remove after debugging!
			logger.Debugf("LIFECYCLE WATCHER %v HAS UPDATES %v", w.collName, updates)
			if !ok {
				return tomb.ErrDying
			}
			if err := w.merge(ids, updates); err != nil {
				return err
			}
			// TODO(mue) Remove after debugging!
			logger.Debugf("LIFECYCLE WATCHER %v IDS ARE %v", w.collName, ids)
			if !ids.IsEmpty() {
				out = w.out
			}
		case out <- values:
			// TODO(mue) Remove after debugging!
			logger.Debugf("LIFECYCLE WATCHER %v SENT %v", w.collName, values)
			ids = make(set.Strings)
			out = nil
		}
Download as text