cause analysis: return 409 when add_task without "lab" in input parameters
Signed-off-by: Lu Weitao luweitaobe@163.com --- src/extract-stats/stats_worker.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/extract-stats/stats_worker.cr b/src/extract-stats/stats_worker.cr index 3cff51d..fcba6af 100644 --- a/src/extract-stats/stats_worker.cr +++ b/src/extract-stats/stats_worker.cr @@ -76,7 +76,8 @@ class StatsWorker unless new_error_ids.empty? 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, - "job_id" => job_id}.to_json)) + "job_id" => job_id, + "lab" => LAB}.to_json)) end msg = %({"job_id": "#{job_id}", "job_state": "extract_finished"}) system "echo '#{msg}'"
TO ALL
补丁描述不能这么敷衍. 这是给后人(包括半年后的自己)埋坑.
"can not send delimiter task" 是什么具体情况?
看不出具体问题, 也看不出fix与问题的关联/前因后果.
Thanks, Fengguang
On Mon, Sep 28, 2020 at 05:28:50PM +0800, Lu Weitao wrote:
cause analysis: return 409 when add_task without "lab" in input parameters
Signed-off-by: Lu Weitao luweitaobe@163.com
src/extract-stats/stats_worker.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/extract-stats/stats_worker.cr b/src/extract-stats/stats_worker.cr index 3cff51d..fcba6af 100644 --- a/src/extract-stats/stats_worker.cr +++ b/src/extract-stats/stats_worker.cr @@ -76,7 +76,8 @@ class StatsWorker unless new_error_ids.empty? 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,
"job_id" => job_id}.to_json))
"job_id" => job_id,
end msg = %({"job_id": "#{job_id}", "job_state": "extract_finished"}) system "echo '#{msg}'""lab" => LAB}.to_json))
-- 2.23.0
On Mon, Sep 28, 2020 at 07:49:00PM +0800, Wu Fengguang wrote:
TO ALL
补丁描述不能这么敷衍. 这是给后人(包括半年后的自己)埋坑.
I should give a more specific description.
"can not send delimiter task" 是什么具体情况?
we call TaskQueueAPI.add_task(service_queue path, task) to add a task, the latest API require {'lab' => $LAB} in task(input params) content, in fact we miss it, so get the error message" 409, need lab in the task content"
看不出具体问题, 也看不出fix与问题的关联/前因后果.
OK, got it
Thanks, Weitao
Thanks, Fengguang
On Mon, Sep 28, 2020 at 05:28:50PM +0800, Lu Weitao wrote:
cause analysis: return 409 when add_task without "lab" in input parameters
Signed-off-by: Lu Weitao luweitaobe@163.com
src/extract-stats/stats_worker.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/extract-stats/stats_worker.cr b/src/extract-stats/stats_worker.cr index 3cff51d..fcba6af 100644 --- a/src/extract-stats/stats_worker.cr +++ b/src/extract-stats/stats_worker.cr @@ -76,7 +76,8 @@ class StatsWorker unless new_error_ids.empty? 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,
"job_id" => job_id}.to_json))
"job_id" => job_id,
end msg = %({"job_id": "#{job_id}", "job_state": "extract_finished"}) system "echo '#{msg}'""lab" => LAB}.to_json))
-- 2.23.0