Commit 60359b4b authored by George Goldberg's avatar George Goldberg Committed by Harrison Healey

MM-10269: Make jobserver work without restart. (#9005)

parent ecefa6cd
......@@ -208,6 +208,9 @@ func New(options ...Option) (outApp *App, outErr error) {
}
app.initJobs()
app.AddLicenseListener(func() {
app.initJobs()
})
subpath, err := utils.GetSubpathFromConfig(app.Config())
if err != nil {
......
......@@ -95,6 +95,8 @@ func (workers *Workers) Start() *Workers {
}
func (workers *Workers) handleConfigChange(oldConfig *model.Config, newConfig *model.Config) {
mlog.Debug("Workers received config change.")
if workers.DataRetention != nil {
if (!*oldConfig.DataRetentionSettings.EnableMessageDeletion && !*oldConfig.DataRetentionSettings.EnableFileDeletion) && (*newConfig.DataRetentionSettings.EnableMessageDeletion || *newConfig.DataRetentionSettings.EnableFileDeletion) {
go workers.DataRetention.Run()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment