On Tue, Dec 22, 2020 at 09:31:39AM +0800, Wu Zhende wrote:
If submit yaml in /srv/result, will not check account info.
仅仅只是 /srv/result ? 无法根据变更的代码看出来你所说的changlog.
Thanks, RenWen
Fix it
Signed-off-by: Wu Zhende wuzhende666@163.com
src/lib/job.cr | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 4d0b5df..e6f7e6a 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -51,17 +51,23 @@ class Job
def initialize(job_content : JSON::Any, id) @hash = job_content.as_h
@es = Elasticsearch::Client.new
@account_info = Hash(String, JSON::Any).new
# init job with "-1", or use the original job_content["id"] id = "-1" if "#{id}" == ""
if initialized?
return if @hash["id"] == "#{id}"
if @hash["id"] == "#{id}"
return unless @hash.has_key?("my_uuid") || @hash.has_key?("my_token")
check_account_info()
return
endend
- @es = Elasticsearch::Client.new @hash["id"] = JSON::Any.new("#{id}")
- @account_info = Hash(String, JSON::Any).new
- check_required_keys() check_account_info() set_defaults()
-- 2.23.0