We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5949349 commit 7e8b86cCopy full SHA for 7e8b86c
gpustat/cli.py
@@ -39,9 +39,9 @@ def update_history(gpu_stats):
39
for gpu_id in history[hostname].keys():
40
cleaned_users = []
41
for username, last_used in history[hostname][gpu_id].items():
42
- used_before = (datetime.datetime.now() - last_used['last_used']).seconds / 3600
43
- if used_before > 24 * 7:
44
- # clean use history longer than 7 days
+ used_before = (datetime.datetime.now() - last_used['last_used']).days
+ if used_before > 3:
+ # clean use history longer than 3 days
45
cleaned_users.append(username)
46
for username in cleaned_users:
47
history[hostname][gpu_id].pop(username)
0 commit comments