On Tue, Jan 19, 2021 at 04:41:56PM +0800, Ren Wen wrote:
On Tue, Jan 19, 2021 at 09:42:46AM +0800, Cao Xueliang wrote:
We choice the error_id which has the compile file for more credible git bisect.
choice -> select | pick ? 'choice' is not a verb.
Good.
Thanks, Xueliang
Thanks, RenWen
Signed-off-by: Cao Xueliang caoxl78320@163.com
src/extract-stats/stats_worker.cr | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/extract-stats/stats_worker.cr b/src/extract-stats/stats_worker.cr index bcf6e52..4f3bd81 100644 --- a/src/extract-stats/stats_worker.cr +++ b/src/extract-stats/stats_worker.cr @@ -82,10 +82,10 @@ class StatsWorker } )
- new_error_ids = check_new_error_ids(error_ids, job_id)
- unless new_error_ids.empty?
- error_id = choice_error_id(check_new_error_ids(error_ids, job_id))
- if error_id STDOUT.puts "send a delimiter task: job_id is #{job_id}"
@tq.add_task(DELIMITER_TASK_QUEUE, JSON.parse({"error_id" => new_error_ids.sample,
end@tq.add_task(DELIMITER_TASK_QUEUE, JSON.parse({"error_id" => error_id, "job_id" => job_id, "lab" => LAB}.to_json))
@@ -93,6 +93,14 @@ class StatsWorker system "echo '#{msg}'" end
- def choice_error_id(new_error_ids : Array)
- new_error_ids.each do |error_id|
return error_id if /(cpp|c|h):(warning|error)/i =~ error_id
- end
- return nil
- end
- def check_new_error_ids(error_ids : Array, job_id : String) new_error_ids = [] of String error_ids.each do |error_id|
-- 2.23.0