Signed-off-by: Cao Xueliang caoxl78320@163.com --- src/delimiter/constants.rb | 1 + src/delimiter/utils.rb | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/delimiter/constants.rb b/src/delimiter/constants.rb index 93b633d..04f87f4 100644 --- a/src/delimiter/constants.rb +++ b/src/delimiter/constants.rb @@ -6,6 +6,7 @@ START_PROCESS_COUNT = 10 GIT_MIRROR_HOST = ENV['GIT_MIRROR_HOST'] || '172.17.0.1' MONITOR_HOST = ENV['MONITOR_HOST'] || '172.17.0.1' MONITOR_PORT = ENV['MONITOR_PORT'] || '11310' +DELIMITER_ACCONUT = ENV['DELIMITER_ACCONUT'] || 'compass-ci@qq.com' TMEP_GIT_BASE = '/c/public_git' DELIMITER_TASK_QUEUE = 'delimiter' BISECT_RUN_SCRIPT = "#{ENV['CCI_SRC']}/src/delimiter/find-commit/bisect_run_script.rb" diff --git a/src/delimiter/utils.rb b/src/delimiter/utils.rb index 679c8d9..90c3cce 100644 --- a/src/delimiter/utils.rb +++ b/src/delimiter/utils.rb @@ -88,16 +88,24 @@ module Utils return 'good' end
+ def get_account_info + ESQuery.new(index: 'accounts').query_by_id(DELIMITER_ACCONUT) + end + def init_job_content(job_id) es = ESQuery.new job = es.query_by_id(job_id) raise "es query job id: #{job_id} failed!" unless job
- job['bad_job_id'] = job_id + account_info = get_account_info + raise "query #{DELIMITER_ACCONUT} account info failed!" unless account_info + job['suite'] = 'bisect' + job['my_uuid'] = account_info['my_uuid'] + job['my_name'] = account_info['my_name'] + job['my_email'] = account_info['my_email'] + job['bad_job_id'] = job_id
- job.delete('id') - job.delete('uuid') job.delete('error_ids') job.delete('start_time') job.delete('end_time')