From 3afd466032c8acf49c6d274a3eefd8583d9e7641 Mon Sep 17 00:00:00 2001 From: wq <2332054245@qq.com> Date: Thu, 17 Jul 2025 16:28:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E4=BB=8E=E6=95=B0=E6=8D=AE=E5=BA=93get?= =?UTF-8?q?=5Fjob=E7=9A=84=E6=97=B6=E5=80=99=E6=B2=A1=E6=9C=89=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/elasticsearch_client.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elasticsearch_client.cr b/src/elasticsearch_client.cr index bb3b24cc6..bd2a17cf6 100644 --- a/src/elasticsearch_client.cr +++ b/src/elasticsearch_client.cr @@ -202,7 +202,7 @@ class Elasticsearch::Client begin response = Manticore::Client.get_source("jobs", id64) return nil if !response.is_a?(JSON::Any) - response = Manticore.job_from_manticore(response.as_h) + return response = Manticore.job_from_manticore(response.as_h) rescue return nil end @@ -215,8 +215,8 @@ class Elasticsearch::Client response = get_doc(job_id.to_i64) case response - when JSON::Any - job = JobHash.new(response.as_h, job_id) + when Hash + job = JobHash.new(response, job_id) else job = nil end -- Gitee From 364cb0a02109542b8ae2a699deb2cddd876500fb Mon Sep 17 00:00:00 2001 From: wq <2332054245@qq.com> Date: Thu, 17 Jul 2025 16:35:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E4=BB=8E=E6=95=B0=E6=8D=AE=E5=BA=93get?= =?UTF-8?q?=5Fjob=E7=9A=84=E6=97=B6=E5=80=99=E6=B2=A1=E6=9C=89=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/elasticsearch_client.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/elasticsearch_client.cr b/src/elasticsearch_client.cr index bd2a17cf6..8094bff95 100644 --- a/src/elasticsearch_client.cr +++ b/src/elasticsearch_client.cr @@ -216,7 +216,7 @@ class Elasticsearch::Client case response when Hash - job = JobHash.new(response, job_id) + job = JobHash.new(response) else job = nil end -- Gitee