From 39ad468dfee7ceac1456a67604af774528341a80 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 16 Oct 2020 10:38:20 -0700 Subject: Add async_pending_last time to object.recon The async_pending count isn't near as useful when we don't know how out of date it is. Change-Id: I3e5e904ffc0eba7a7e141e1c2d9f9840e4952041 --- bin/swift-recon-cron | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/swift-recon-cron b/bin/swift-recon-cron index d9384f313..fa8051b66 100755 --- a/bin/swift-recon-cron +++ b/bin/swift-recon-cron @@ -18,6 +18,7 @@ swift-recon-cron.py import os import sys +import time from eventlet import Timeout @@ -65,7 +66,10 @@ def main(): try: with lock_path(lock_dir): asyncs = get_async_count(device_dir, logger) - dump_recon_cache({'async_pending': asyncs}, cache_file, logger) + dump_recon_cache({ + 'async_pending': asyncs, + 'async_pending_last': time.time(), + }, cache_file, logger) except (Exception, Timeout) as err: msg = 'Exception during recon-cron while accessing devices' logger.exception(msg) -- cgit v1.2.1