mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Fix status table race condition (#1835)
This commit is contained in:
parent
0f5b399e35
commit
bfb44f8854
5 changed files with 26 additions and 10 deletions
|
@ -1334,10 +1334,9 @@ func GetWatchedRepos(userID int64, private bool) ([]*Repository, error) {
|
|||
|
||||
// SyncExternalUsers is used to synchronize users with external authorization source
|
||||
func SyncExternalUsers() {
|
||||
if taskStatusTable.IsRunning(syncExternalUsers) {
|
||||
if !taskStatusTable.StartIfNotRunning(syncExternalUsers) {
|
||||
return
|
||||
}
|
||||
taskStatusTable.Start(syncExternalUsers)
|
||||
defer taskStatusTable.Stop(syncExternalUsers)
|
||||
|
||||
log.Trace("Doing: SyncExternalUsers")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue