mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
fix gc job submit issue
fixes #12795 Return 409 on triggering a GC job when there is a job ongoing. Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
da52e677e5
commit
44f7bf6739
@ -261,7 +261,7 @@ func (aj *AJAPI) submit(ajr *models.AdminJobReq) {
|
||||
if jb.UpdateTime.Add(2 * time.Hour).After(time.Now()) {
|
||||
if isOnGoing(jb.Status) {
|
||||
err := errors.Errorf("reject job submitting: job %s with ID %d is %s", jb.Name, jb.ID, jb.Status)
|
||||
aj.SendInternalServerError(errors.Wrap(err, "submit : AJAPI"))
|
||||
aj.SendConflictError(errors.Wrap(err, "submit : AJAPI"))
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user