watcher: Write per-group instance status, merge into global one
authorMichael Hanselmann <hansmi@google.com>
Fri, 5 Aug 2011 09:57:50 +0000 (11:57 +0200)
committerMichael Hanselmann <hansmi@google.com>
Fri, 5 Aug 2011 11:06:23 +0000 (13:06 +0200)
commit9bb69bb52fb95e40c5167a30dca0ebb116d5e829
treef0bf11afbdcb2da51a994bd2e731f8e82df9ccb8
parent6890cf2e53099db5e6c446ee4846d565b921c58b
watcher: Write per-group instance status, merge into global one

Each per-group watcher process writes its own instance status file. Once
that's done it tries to acquire an exclusive lock on the global file and
will proceed to read all status file, merging them based on each file's
mtime. If an instance is moved to another group, the newer status will
supersede that of an older file which hasn't yet been updated.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/constants.py
lib/watcher/__init__.py