MM-21150: Re-create the workers so that the EE workers are non-nil up… (#13523)

* MM-21150: Re-create the workers so that the EE workers are non-nil upon uploading a license.

* MM-21150: Updates from Srv field to method.

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Martin Kraft
2020-02-16 11:07:25 -05:00
committed by GitHub
parent 9a51c73f64
commit 0564cc4271

View File

@@ -98,6 +98,11 @@ func addLicense(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if *c.App.Config().JobSettings.RunJobs {
c.App.Srv().Jobs.Workers = c.App.Srv().Jobs.InitWorkers()
c.App.Srv().Jobs.StartWorkers()
}
c.LogAudit("success")
w.Write([]byte(license.ToJson()))
}