fix startup schedule builder for new installs, #408

This commit is contained in:
simon 2023-01-16 09:13:58 +07:00
parent c0e36133a1
commit 5d0689abba
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 4 additions and 6 deletions

View File

@ -135,6 +135,7 @@ class AppConfig:
# check for customizations
if not redis_config:
config = self.get_config()
config["scheduler"]["version_check"] = self._build_rand_daily()
RedisArchivist().set_message("config", config)
return

View File

@ -313,9 +313,6 @@ def version_check():
ReleaseVersion().check()
try:
app.conf.beat_schedule = ScheduleBuilder().build_schedule()
except KeyError:
# update path to load new defaults
StartupCheck().sync_redis_state()
app.conf.beat_schedule = ScheduleBuilder().build_schedule()
# load new defaults then start the schedule here
StartupCheck().sync_redis_state()
app.conf.beat_schedule = ScheduleBuilder().build_schedule()