Update statistics_hook.py

This commit is contained in:
HibiKier 2021-06-23 16:42:49 +08:00 committed by GitHub
parent 46895e4216
commit 05f8d52f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,15 @@ except (FileNotFoundError, ValueError):
'start_time': str(datetime.now().date()),
'day_index': 0
}
if not _prefix_count_dict.get('day_index'):
tmp = _prefix_count_dict.copy()
_prefix_count_dict = {'total_statistics': tmp['total_statistics'], 'day_statistics': {
'total': {},
}, 'week_statistics': {
'total': {},
}, 'month_statistics': {
'total': {},
}, 'start_time': str(datetime.now().date()), 'day_index': 0}
# 添加命令次数