On Fri, Aug 21, 2020 at 09:12:22AM +0800, Wu Zhende wrote:
>On Fri, Aug 21, 2020 at 12:28:06AM +0800, Du Kaitian wrote:
>>On Thu, Aug 20, 2020 at 08:37:26PM +0800, Wu Zhende wrote:
>>>1.use job_id not id
>>>2.use state not job_state
>>既然这里要将参数变化,为啥在之处不用 job_id 及state
>>来描述,而要做相关更新
>
>Because the job_content is use to update into job.
>In our job, is using id not job_id.
>job_state is from lkp, add in the url.
>
>Thanks,
>Zhende.
不理解,这样修改的目的是什么,有什么好处
谢谢
jimmy
>
>>
>>>3.add testbox in wtmp log
>>>
>>>Signed-off-by: Wu Zhende <wuzhende1(a)huawei.com>
>>>---
>>> src/lib/sched.cr | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>>diff --git a/src/lib/sched.cr b/src/lib/sched.cr
>>>index faa3553..d836ace 100644
>>>--- a/src/lib/sched.cr
>>>+++ b/src/lib/sched.cr
>>>@@ -237,7 +237,13 @@ class Sched
>>>
>>> @redis.update_job(job_content)
>>>
>>>+ # json log
>>> job_content["job_id"] = job_id
>>>+ job_content.delete("id")
>>>+ if job_content.has_key?("job_state")
>>>+ job_content["state"] = job_content["job_state"]
>>>+ job_content.delete("job_state")
>>>+ end
>>> puts job_content.to_json
>>> end
>>>
>>>@@ -266,6 +272,7 @@ class Sched
>>>
>>> @redis.update_wtmp(testbox, hash)
>>>
>>>+ hash["testbox"] = testbox
>>> puts hash.to_json
>>> end
>>>
>>>--
>>>2.23.0
>>>