[#4431] always refresh the app settings before loading the backup cron job
This commit is contained in:
@@ -248,6 +248,11 @@ func (app *BaseApp) initAutobackupHooks() error {
|
|||||||
loadJob := func() {
|
loadJob := func() {
|
||||||
c.Stop()
|
c.Stop()
|
||||||
|
|
||||||
|
// make sure that app.Settings() is always up to date
|
||||||
|
//
|
||||||
|
// @todo remove with the refactoring as core.App and daos.Dao will be one.
|
||||||
|
app.RefreshSettings()
|
||||||
|
|
||||||
rawSchedule := app.Settings().Backups.Cron
|
rawSchedule := app.Settings().Backups.Cron
|
||||||
if rawSchedule == "" || !isServe || !app.IsBootstrapped() {
|
if rawSchedule == "" || !isServe || !app.IsBootstrapped() {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user