diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-10-23 17:46:17 +0100 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-10-23 17:46:17 +0100 |
commit | ea343aa44b865d27c4524cd22768d57af6a07f59 (patch) | |
tree | 2730a482f72b1318482fbb9a279edee4a1ea6764 /util.py | |
parent | 869ee5d77206fa7c117df2c7ea37957a0902219e (diff) |
Add a database last-modified-time
Add a new table which will have one record, simply containing the
last-modified-time of the database as a whole. Will be useful for
caching in the visualisation layer.
Create the table at startup in the main VLANd process if it doesn't
exist, and create the record too.
Add code to update the record on all other changes to the database.
Add code to report it through the daemon.status() API call.
Change-Id: I503c4371c04accb2c3f91adecc3e8a8a8614ea90
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -117,6 +117,7 @@ class VlanUtil: if command == 'daemon.status': # data ignored ret['running'] = 'ok' + ret['last_modified'] = state.db.get_last_modified_time() elif command == 'daemon.version': # data ignored ret['version'] = state.version |