Fix tests on CI (2)
All checks were successful
Build Docker and Deploy / Build Docker Container (push) Successful in 48s
Build Docker and Deploy / Run Unit-Tests (push) Successful in 8m38s
Build Docker and Deploy / Deploy to Server (push) Successful in 9s

This commit is contained in:
2025-05-11 20:32:49 +02:00
parent 56db0929d1
commit cc13f8a0f3
8 changed files with 42 additions and 574 deletions

View File

@@ -105,6 +105,9 @@ func (j *RequestLogCleanupJob) execute() (err error) {
ctx := j.app.NewSimpleTransactionContext(10 * time.Second)
defer ctx.Cancel()
j.app.RequestDatabaseLock.Lock()
defer j.app.RequestDatabaseLock.Unlock()
deleted, err := j.app.Database.Requests.Cleanup(ctx, j.app.Config.ReqLogHistoryMaxCount, j.app.Config.ReqLogHistoryMaxDuration)
if err != nil {
return err

View File

@@ -90,6 +90,8 @@ mainLoop:
}
func (j *RequestLogCollectorJob) insertLog(requestid models.RequestID, rl models.RequestLog) error {
j.app.RequestDatabaseLock.Lock()
defer j.app.RequestDatabaseLock.Unlock()
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()