https://codereview.appspot.com/10078043/diff/14002/state/state_test.go#newcode1420
state/state_test.go:1420: // Don't handle each event keeps them in the
queue. Cleanups
On 2013/06/07 12:24:50, dimitern wrote:
> // Not calling Cleanup() queues up the changes, so that
> // multiple changes will be emitted the next time Cleanup()
> // is called. This behavior will change in a follow-up.
That's not correct, the second part is related to the internal behavior
of Cleanup() with individual transactions per deletion. Will separate
this better.
*** Submitted:
state: added CleanupWatcher
The CleanupWatcher signals the demand for the running of
state.Cleanup(). It is the first in a row of CLs to add
an according worker.
R=fwereade, dimitern /codereview. appspot. com/10078043
CC=
https:/
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/state_ test.go
File state/state_test.go (right):
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/state_ test.go# newcode1363 test.go: 1363: c.Fatalf( "unexpected change: %v", ok)
state/state_
On 2013/06/07 12:24:50, dimitern wrote:
> please change this to say "unexpected change; ok: %v"
Done.
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/state_ test.go# newcode1383 test.go: 1383: // Add relations doesn't emit events.
state/state_
On 2013/06/07 12:24:50, dimitern wrote:
> // Adding relations doesn't emit events.
Done.
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/state_ test.go# newcode1415 test.go: 1415: // A cleanup without need doesn't emit events.
state/state_
On 2013/06/07 12:24:50, dimitern wrote:
> // Verify that Cleanup() doesn't emit unnecessary events.
Done.
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/state_ test.go# newcode1420 test.go: 1420: // Don't handle each event keeps them in the
state/state_
queue. Cleanups
On 2013/06/07 12:24:50, dimitern wrote:
> // Not calling Cleanup() queues up the changes, so that
> // multiple changes will be emitted the next time Cleanup()
> // is called. This behavior will change in a follow-up.
That's not correct, the second part is related to the internal behavior
of Cleanup() with individual transactions per deletion. Will separate
this better.
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/watcher. go
File state/watcher.go (right):
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/watcher. go#newcode1251 go:1251: // CleanupWatcher notifies changes of the cleanup
state/watcher.
documents
On 2013/06/07 12:24:50, dimitern wrote:
> // CleanupWatcher notifies of changes in the cleanups collection.
> ?
Done.
https:/ /codereview. appspot. com/10078043/ diff/14002/ state/watcher. go#newcode1258 go:1258: // WatchCleanups returns a CleanupWatcher that
state/watcher.
notifies when documents
On 2013/06/07 12:24:50, dimitern wrote:
> // WatchCleanups starts and returns a CleanupWatcher.
Done.
https:/ /codereview. appspot. com/10078043/