1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 07:26:37 +00:00

Send repo update event to notification server (#602)

* Send repo update event to notification server

* Add option to manage configuration

* Init default options at start

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2023-03-11 12:14:39 +08:00
committed by GitHub
parent d38c212ba1
commit 9173f217a4
8 changed files with 373 additions and 246 deletions

View File

@@ -13,6 +13,7 @@ import (
"github.com/haiwen/seafile-server/fileserver/commitmgr"
"github.com/haiwen/seafile-server/fileserver/diff"
"github.com/haiwen/seafile-server/fileserver/fsmgr"
"github.com/haiwen/seafile-server/fileserver/option"
"github.com/haiwen/seafile-server/fileserver/repomgr"
"github.com/haiwen/seafile-server/fileserver/workerpool"
log "github.com/sirupsen/logrus"
@@ -254,7 +255,7 @@ func handleMissingVirtualRepo(repo *repomgr.Repo, head *commitmgr.Commit, vInfo
if err != nil || oldDirID == "" {
if err == fsmgr.ErrPathNoExist {
repomgr.DelVirtualRepo(vInfo.RepoID, cloudMode)
repomgr.DelVirtualRepo(vInfo.RepoID, option.CloudMode)
}
err := fmt.Errorf("failed to find %s under commit %s in repo %s", parPath, parent.CommitID, repo.StoreID)
return "", err
@@ -296,7 +297,7 @@ func handleMissingVirtualRepo(repo *repomgr.Repo, head *commitmgr.Commit, vInfo
}
if !isRenamed {
repomgr.DelVirtualRepo(vInfo.RepoID, cloudMode)
repomgr.DelVirtualRepo(vInfo.RepoID, option.CloudMode)
}
return returnPath, nil