MM-10269: Make jobserver work without restart. (#9005)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
ecefa6cdd1
Коммит
60359b4bae
@@ -208,6 +208,9 @@ func New(options ...Option) (outApp *App, outErr error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.initJobs()
|
app.initJobs()
|
||||||
|
app.AddLicenseListener(func() {
|
||||||
|
app.initJobs()
|
||||||
|
})
|
||||||
|
|
||||||
subpath, err := utils.GetSubpathFromConfig(app.Config())
|
subpath, err := utils.GetSubpathFromConfig(app.Config())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ func (workers *Workers) Start() *Workers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (workers *Workers) handleConfigChange(oldConfig *model.Config, newConfig *model.Config) {
|
func (workers *Workers) handleConfigChange(oldConfig *model.Config, newConfig *model.Config) {
|
||||||
|
mlog.Debug("Workers received config change.")
|
||||||
|
|
||||||
if workers.DataRetention != nil {
|
if workers.DataRetention != nil {
|
||||||
if (!*oldConfig.DataRetentionSettings.EnableMessageDeletion && !*oldConfig.DataRetentionSettings.EnableFileDeletion) && (*newConfig.DataRetentionSettings.EnableMessageDeletion || *newConfig.DataRetentionSettings.EnableFileDeletion) {
|
if (!*oldConfig.DataRetentionSettings.EnableMessageDeletion && !*oldConfig.DataRetentionSettings.EnableFileDeletion) && (*newConfig.DataRetentionSettings.EnableMessageDeletion || *newConfig.DataRetentionSettings.EnableFileDeletion) {
|
||||||
go workers.DataRetention.Run()
|
go workers.DataRetention.Run()
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user