feat: change gc config for manager job (#3507)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2024-09-18 11:38:00 +08:00 committed by GitHub
parent 624bf2893e
commit e8d696bd62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ const (
DefaultJobGCInterval = 24 * time.Hour DefaultJobGCInterval = 24 * time.Hour
// DefaultJobGCTTL is the default ttl for job. // DefaultJobGCTTL is the default ttl for job.
DefaultJobGCTTL = 7 * 24 * time.Hour DefaultJobGCTTL = 24 * time.Hour
// DefaultJobPreheatRegistryTimeout is the default timeout for requesting registry to get token and manifest. // DefaultJobPreheatRegistryTimeout is the default timeout for requesting registry to get token and manifest.
DefaultJobPreheatRegistryTimeout = 1 * time.Minute DefaultJobPreheatRegistryTimeout = 1 * time.Minute

@ -1 +1 @@
Subproject commit feda25f78cf01105760034676365492f8db02d53 Subproject commit b8e77ff88b36b17f00eac4f33ce455d6b4ff07fc

View File

@ -319,7 +319,7 @@ func (s *service) GetJobs(ctx context.Context, q types.GetJobsQuery) ([]models.J
Type: q.Type, Type: q.Type,
State: q.State, State: q.State,
UserID: q.UserID, UserID: q.UserID,
}).Find(&jobs).Limit(-1).Offset(-1).Count(&count).Error; err != nil { }).Order("created_at DESC").Find(&jobs).Limit(-1).Offset(-1).Count(&count).Error; err != nil {
return nil, 0, err return nil, 0, err
} }