Change the App dependency with Server in migrations package (#14804)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2020-06-29 18:00:16 +02:00
коммит произвёл GitHub
родитель a9ba052207
Коммит e2e352e223
7 изменённых файлов: 26 добавлений и 26 удалений

Просмотреть файл

@@ -129,9 +129,6 @@ func (a *App) initJobs() {
if jobsLdapSyncInterface != nil {
a.srv.Jobs.LdapSync = jobsLdapSyncInterface(a)
}
if jobsMigrationsInterface != nil {
a.srv.Jobs.Migrations = jobsMigrationsInterface(a)
}
if jobsPluginsInterface != nil {
a.srv.Jobs.Plugins = jobsPluginsInterface(a)
}

Просмотреть файл

@@ -72,9 +72,9 @@ func RegisterJobsLdapSyncInterface(f func(*App) ejobs.LdapSyncInterface) {
jobsLdapSyncInterface = f
}
var jobsMigrationsInterface func(*App) tjobs.MigrationsJobInterface
var jobsMigrationsInterface func(*Server) tjobs.MigrationsJobInterface
func RegisterJobsMigrationsJobInterface(f func(*App) tjobs.MigrationsJobInterface) {
func RegisterJobsMigrationsJobInterface(f func(*Server) tjobs.MigrationsJobInterface) {
jobsMigrationsInterface = f
}

Просмотреть файл

@@ -1290,4 +1290,7 @@ func (s *Server) initJobs() {
if jobsBleveIndexerInterface != nil {
s.Jobs.BleveIndexer = jobsBleveIndexerInterface(s)
}
if jobsMigrationsInterface != nil {
s.Jobs.Migrations = jobsMigrationsInterface(s)
}
}