Keep the recurring SCUM database poll bounded
Each dispatched poll is a durable job with two job log streams, so an unbounded poll history would grow the platform store by roughly two thousand jobs a day per server. A new poll now retires older terminal jobs of the same template together with their job log streams, leaving at most two rows per template while nothing is in flight.
This commit is contained in:
@@ -71,6 +71,7 @@ type JobRepository interface {
|
||||
GetByIdempotency(runEndpointID string, idempotencyKey string) (domain.Job, error)
|
||||
List(domain.JobFilter) ([]domain.Job, error)
|
||||
Update(domain.Job) error
|
||||
Delete(id string) error
|
||||
}
|
||||
|
||||
type ArtifactRepository interface {
|
||||
@@ -120,6 +121,7 @@ type LogStreamRepository interface {
|
||||
Get(id string) (domain.LogStream, error)
|
||||
List(domain.LogStreamFilter) ([]domain.LogStream, error)
|
||||
Update(domain.LogStream) error
|
||||
Delete(id string) error
|
||||
}
|
||||
|
||||
type MetricSampleRepository interface {
|
||||
|
||||
Reference in New Issue
Block a user