mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Fix database locked errors (#3153)
* Make read-only operations use WithReadTxn * Allow one database write thread * Add unit test for concurrent transactions * Perform some actions after commit to release txn * Suppress some errors from cancelled context
This commit is contained in:
@@ -44,8 +44,8 @@ func (t *GeneratePhashTask) Start(ctx context.Context) {
|
||||
})
|
||||
|
||||
return qb.Update(ctx, t.File)
|
||||
}); err != nil {
|
||||
logger.Error(err.Error())
|
||||
}); err != nil && ctx.Err() == nil {
|
||||
logger.Errorf("Error setting phash: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user