summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2020-10-16 10:38:20 -0700
committerTim Burke <tim.burke@gmail.com>2021-06-15 08:12:05 -0700
commit39ad468dfee7ceac1456a67604af774528341a80 (patch)
tree37cf8b7d7656c981e2482d34fabb20427c3373cf /bin
parent1a5b42da9e43f4fef16ceba9eb19aec9344d7132 (diff)
downloadswift-39ad468dfee7ceac1456a67604af774528341a80.tar.gz
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/swift-recon-cron6
1 files changed, 5 insertions, 1 deletions
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)