Fix tests on CI (2)
This commit is contained in:
@@ -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
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user