jobqueue: store an expiry date
This introduces an expiry date (default: 14 days from insert date) and adjust the service-maintenance script to delete jobs that are older than the expiration date.
This commit is contained in:
parent
37fc807bfa
commit
78ae275c61
4 changed files with 59 additions and 113 deletions
|
|
@ -72,6 +72,7 @@ type job struct {
|
|||
QueuedAt time.Time `json:"queued_at,omitempty"`
|
||||
StartedAt time.Time `json:"started_at,omitempty"`
|
||||
FinishedAt time.Time `json:"finished_at,omitempty"`
|
||||
ExpiresAt time.Time `json:"expires_at,omitempty"`
|
||||
|
||||
Canceled bool `json:"canceled,omitempty"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue