[#4431] always refresh the app settings before loading the backup cron job
This commit is contained in:
		
							parent
							
								
									548fce20b5
								
							
						
					
					
						commit
						53ee5212bc
					
				| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue