diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-12-23 12:17:37 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-01-19 11:26:54 +0100 |
| commit | 4bd62a18b32a876e5ef2b024e454ccf793849050 (patch) | |
| tree | 456fed644cb4dd9e2c99207c34f68755a54dc4cb /dashboard/dashapi/dashapi.go | |
| parent | 62267f1427dd04f238043c6c9bd560c8c9d672fe (diff) | |
dashboard: support multiple simultaneous jobs
Modify job_poll never to return already started jobs.
Introduce a special job_reset API call to clear the "started" flag for
the specified list of managers.
Diffstat (limited to 'dashboard/dashapi/dashapi.go')
| -rw-r--r-- | dashboard/dashapi/dashapi.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 348fe92c5..4c46d1582 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -147,6 +147,8 @@ func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error) { } // Jobs workflow: +// - syz-ci sends JobResetReq to indicate that no previously started jobs +// are any longer in progress. // - syz-ci sends JobPollReq periodically to check for new jobs, // request contains list of managers that this syz-ci runs. // - dashboard replies with JobPollResp that contains job details, @@ -155,6 +157,10 @@ func (dash *Dashboard) BuilderPoll(manager string) (*BuilderPollResp, error) { // job execution result (Build, Crash or Error details), // ID must match JobPollResp.ID. +type JobResetReq struct { + Managers []string +} + type JobPollReq struct { Managers map[string]ManagerJobs } @@ -228,6 +234,10 @@ func (dash *Dashboard) JobDone(req *JobDoneReq) error { return dash.Query("job_done", req, nil) } +func (dash *Dashboard) JobReset(req *JobResetReq) error { + return dash.Query("job_reset", req, nil) +} + type BuildErrorReq struct { Build Build Crash Crash |
