Fix sqlite lock (#5176)
* fix sqlite lock * fix sqlite lock on getUnitType
This commit is contained in:
parent
554581f848
commit
5f938c0c78
3 changed files with 13 additions and 5 deletions
|
@ -215,7 +215,11 @@ func (t *Team) RemoveRepository(repoID int64) error {
|
|||
|
||||
// UnitEnabled returns if the team has the given unit type enabled
|
||||
func (t *Team) UnitEnabled(tp UnitType) bool {
|
||||
if err := t.getUnits(x); err != nil {
|
||||
return t.unitEnabled(x, tp)
|
||||
}
|
||||
|
||||
func (t *Team) unitEnabled(e Engine, tp UnitType) bool {
|
||||
if err := t.getUnits(e); err != nil {
|
||||
log.Warn("Error loading repository (ID: %d) units: %s", t.ID, err.Error())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue