From: hyokeun Date: Thu, 14 Dec 2017 06:45:05 +0000 (+0900) Subject: Do not insert new cycle information in the comment X-Git-Tag: submit/trunk/20190927.012743~194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=806e9799140945a637174793f86712f4ac51a82b;p=services%2Fjenkins-scripts.git Do not insert new cycle information in the comment Change-Id: I492ffd80ea41beffb7116f703c027dcc64a599a9 --- diff --git a/job_buildmonitor.py b/job_buildmonitor.py index 0223865..c93b561 100644 --- a/job_buildmonitor.py +++ b/job_buildmonitor.py @@ -393,6 +393,13 @@ def update_comment(sr, comment): query = "SELECT submit_time FROM sr_status WHERE sr = %s" parent_sr_time = buildmonitor_db.get_value_from_query_data(query, query_data) + query = "SELECT id FROM sr_comment WHERE sr_status_id=%s AND comment=%s" + query_data = (parent_sr_id, comment) + prev_comment_id = buildmonitor_db.do_query(query, query_data) + # Do not insert duplicated records + if prev_comment_id == 0: + return + query = "INSERT INTO sr_comment (sr_status_id, user, comment, commented_date) VALUES(%s, %s, %s, %s)" query_data = (parent_sr_id, "Tizen Build Bot", comment, parent_sr_time) buildmonitor_db.do_query(query, query_data) @@ -2752,6 +2759,7 @@ def main(): bm_snapshot_url = content.get("bm_snapshot_url") bm_snapshot_name = content.get("bm_snapshot_name") bm_duplicated = content.get("bm_duplicated") + bm_buildfailreason = content.get("bm_buildfailreason") # func call # for sr_stage & build_snapshot