[PATCH compass-ci 3/3] lib/job.cr: set job_state when submit job

2 Mar
2021
2 Mar
'21
8:04 p.m.
Set job_state to "submit" when submitting a job. Because each phase corresponds to a state in lifecycle. We can query all submitted jobs that have not been consumed in ES based on this status. Signed-off-by: Wu Zhende <wuzhende666@163.com> --- src/lib/job.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/job.cr b/src/lib/job.cr index 63ec8fb..60e0b65 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -142,6 +142,7 @@ class Job # init job with "-1", or use the original job_content["id"] id = "-1" if "#{id}" == "" @hash["id"] = JSON::Any.new("#{id}") + self["job_state"] = "submit" check_required_keys() check_account_info() -- 2.23.0
1456
Age (days ago)
1456
Last active (days ago)
0 comments
1 participants
participants (1)
-
Wu Zhende