Skip to content

Commit

Permalink
quick hack, only move updates to updater cache on start
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpdx committed May 27, 2024
1 parent 6fe2635 commit fb7578f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion olaf/_internals/services/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ def on_start(self):
self.node.add_sdo_callbacks("updater", "cache_files_json", self.on_read_cache_json, None)
self.node.add_sdo_callbacks("updater", "cache_length", self.on_read_cache_len, None)

def on_loop(self):
# check for update files in fwrite cache
for i in self.node.fwrite_cache.files("update"):
if i.card == self._hostname:
self._updater.add_update_archive(self.node.fwrite_cache.dir + "/" + i.name)
self.node.fwrite_cache.remove(i.name)
logger.info(f"updater moved {i.name} into update cache")

def on_loop(self):

# check for flag to start a update
if self.node.od_read("updater", "update"):
try:
Expand Down

0 comments on commit fb7578f

Please sign in to comment.