[FIX] add log in py and go,fix data overwrite

This commit is contained in:
bay1ts 2017-11-22 13:20:59 +08:00
parent d7028a906a
commit 3747b6a671
2 changed files with 4 additions and 2 deletions

View File

@ -136,6 +136,7 @@ class CodeCheck():
logger.info('mq_work.service_event',
"service_id=" + service_id + ";condition=" + condition)
res, bodyres = self.user_cs_client.code_check(json.dumps(body))
self.region_client.code_check_region(body)
self.region_client.code_check_region(json.dumps(body))

View File

@ -33,8 +33,9 @@ import (
)
func AddCodeCheck(w http.ResponseWriter, r *http.Request) {
b,_:=ioutil.ReadAll(r.Body)
logrus.Infof("request recive %s",string(b))
//b,_:=ioutil.ReadAll(r.Body)
//{\"url_repos\": \"https://github.com/bay1ts/zk_cluster_mini.git\", \"check_type\": \"first_check\", \"code_from\": \"gitlab_manual\", \"service_id\": \"c24dea8300b9401b1461dd975768881a\", \"code_version\": \"master\", \"git_project_id\": 0, \"condition\": \"{\\\"language\\\":\\\"docker\\\",\\\"runtimes\\\":\\\"false\\\", \\\"dependencies\\\":\\\"false\\\",\\\"procfile\\\":\\\"false\\\"}\", \"git_url\": \"--branch master --depth 1 https://github.com/bay1ts/zk_cluster_mini.git\"}
//logrus.Infof("request recive %s",string(b))
result := new(model.CodeCheckResult)
decoder := json.NewDecoder(r.Body)
defer r.Body.Close()