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)
|
id = body.get("id", None)
|
||||||
value = body.get("value", None)
|
value = body.get("value", None)
|
||||||
if id is None or value is 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)
|
self.config_api.set_config(id, value)
|
||||||
return {"code": 0, "msg": "OK"}
|
return {"code": 0, "msg": "OK"}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Implementation of Template."""
|
"""Implementation of Search Template."""
|
||||||
|
|
||||||
|
|
||||||
def search_params(field, must_params):
|
def search_params(field, must_params):
|
||||||
|
@ -45,7 +45,7 @@ class DeleteESIndexTask(object):
|
|||||||
LOG.error(_LE("delete es inidex:%s, catch exception:%s"),
|
LOG.error(_LE("delete es inidex:%s, catch exception:%s"),
|
||||||
name, str(e))
|
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")
|
len_d = self.config_api.get_config("log_save_days")
|
||||||
if len_d is None:
|
if len_d is None:
|
||||||
LOG.error(_LE("the config of log_save_days do not exist"))
|
LOG.error(_LE("the config of log_save_days do not exist"))
|
||||||
@ -75,7 +75,7 @@ class DeleteESIndexTask(object):
|
|||||||
|
|
||||||
def start_task(self):
|
def start_task(self):
|
||||||
try:
|
try:
|
||||||
self.delete_es_history_index()
|
self.delete_es_outdated_index()
|
||||||
LOG.info(_LI("delete es index task done"))
|
LOG.info(_LI("delete es index task done"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.error(_LE("delete es index task, catch exception:%s"), str(e))
|
LOG.error(_LE("delete es index task, catch exception:%s"), str(e))
|
||||||
|
Loading…
Reference in New Issue
Block a user