improved some function name & note & log
Change-Id: I588619ac0d2d8d229d9e2fa3e0b8849674a8cb6e
This commit is contained in:
parent
94a04cf738
commit
d29f36c61e
@ -40,7 +40,7 @@ class CustomConfigController(wsgi.Controller):
|
||||
id = body.get("id", None)
|
||||
value = body.get("value", None)
|
||||
if id is None or value is None:
|
||||
return {"code": -1, "msg": "invalid param: id and value is need"}
|
||||
return {"code": -1, "msg": "invalid param: id or value is missed"}
|
||||
self.config_api.set_config(id, value)
|
||||
return {"code": 0, "msg": "OK"}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Implementation of Template."""
|
||||
"""Implementation of Search Template."""
|
||||
|
||||
|
||||
def search_params(field, must_params):
|
||||
|
@ -45,7 +45,7 @@ class DeleteESIndexTask(object):
|
||||
LOG.error(_LE("delete es inidex:%s, catch exception:%s"),
|
||||
name, str(e))
|
||||
|
||||
def delete_es_history_index(self):
|
||||
def delete_es_outdated_index(self):
|
||||
len_d = self.config_api.get_config("log_save_days")
|
||||
if len_d is None:
|
||||
LOG.error(_LE("the config of log_save_days do not exist"))
|
||||
@ -75,7 +75,7 @@ class DeleteESIndexTask(object):
|
||||
|
||||
def start_task(self):
|
||||
try:
|
||||
self.delete_es_history_index()
|
||||
self.delete_es_outdated_index()
|
||||
LOG.info(_LI("delete es index task done"))
|
||||
except Exception as e:
|
||||
LOG.error(_LE("delete es index task, catch exception:%s"), str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user