mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2024-12-23 18:30:12 +00:00
return new version in is_updated
This commit is contained in:
parent
83057d9e54
commit
114c7c2811
@ -137,7 +137,7 @@ class AppConfig:
|
||||
config = self.get_config()
|
||||
config["scheduler"]["version_check"] = self._build_rand_daily()
|
||||
RedisArchivist().set_message("config", config)
|
||||
return
|
||||
return False
|
||||
|
||||
needs_update = False
|
||||
|
||||
@ -160,6 +160,8 @@ class AppConfig:
|
||||
if needs_update:
|
||||
RedisArchivist().set_message("config", redis_config)
|
||||
|
||||
return needs_update
|
||||
|
||||
|
||||
class ScheduleBuilder:
|
||||
"""build schedule dicts for beat"""
|
||||
@ -342,11 +344,13 @@ class ReleaseVersion:
|
||||
"""check if update happened in the mean time"""
|
||||
message = self.get_update()
|
||||
if not message:
|
||||
return
|
||||
return False
|
||||
|
||||
if self._parse_version(message.get("version")) == self.local_version:
|
||||
print(f"[{self.local_version}]: update completed")
|
||||
RedisArchivist().del_message(self.NEW_KEY)
|
||||
return settings.TA_VERSION
|
||||
|
||||
return False
|
||||
|
||||
def get_update(self):
|
||||
"""return new version dict if available"""
|
||||
|
Loading…
Reference in New Issue
Block a user