From: Yonghee Han Date: Mon, 24 Jun 2019 06:18:06 +0000 (+0900) Subject: Fixed an issue with imaging status remaining in PMB X-Git-Tag: submit/devel/20190730.075415~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F208415%2F1;p=services%2Fjenkins-scripts.git Fixed an issue with imaging status remaining in PMB Fix build_snapshot to get the last one when there are two id's. Change-Id: I132fa9f73f3822721312f851dc6dfa9465546138 --- diff --git a/job_buildmonitor.py b/job_buildmonitor.py index e9b7130..a1cd07d 100644 --- a/job_buildmonitor.py +++ b/job_buildmonitor.py @@ -742,7 +742,7 @@ def end_create_image_for_sr_stage(bm_start_datetime, project, bm_snapshot_name): curr_build_project_id = buildmonitor_db.get_value_from_query_data(query, query_data) # get curr_build_snapshot_id - query = "SELECT id FROM build_snapshot WHERE build_project_id = %s" + query = "SELECT id FROM build_snapshot WHERE build_project_id = %s ORDER BY id DESC LIMIT 1" query_data = (curr_build_project_id,) curr_build_snapshot_id = buildmonitor_db.get_value_from_query_data(query, query_data) # get multi_build_image_status @@ -773,7 +773,7 @@ def end_create_image_for_sr_stage(bm_start_datetime, project, bm_snapshot_name): print 'post_build_project_id(%s)\n' % (post_build_project_id) # get curr_build_snapshot_id - query = "SELECT id FROM build_snapshot WHERE build_project_id = %s" + query = "SELECT id FROM build_snapshot WHERE build_project_id = %s ORDER BY id DESC LIMIT 1" query_data = (post_build_project_id,) curr_build_snapshot_id = buildmonitor_db.get_value_from_query_data(query, query_data) # get multi_build_image_status