Set default values only on the first start (#7735)

This commit is contained in:
Andriy Yurkiv 2021-06-09 13:39:22 +03:00 committed by GitHub
parent f547cadf28
commit 0c2521b936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,10 +11,12 @@ DEFAULT_ALPHA = '0.18'
def enable_counter_group(db, name):
info = {}
info['FLEX_COUNTER_STATUS'] = 'enable'
db.mod_entry("FLEX_COUNTER_TABLE", name, info)
entry_info = db.get_entry("FLEX_COUNTER_TABLE", name)
if not entry_info:
info = {}
info['FLEX_COUNTER_STATUS'] = 'enable'
db.mod_entry("FLEX_COUNTER_TABLE", name, info)
def enable_rates():
# set the default interval for rates