Skip to content

Commit

Permalink
CI Cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
AThousandShips committed Sep 7, 2024
1 parent 82cf1c2 commit 7bfddee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ def show_progress(env):
# Has its own progress/tracking tool that clashes with ours
return

import atexit
import sys

from SCons.Script import AlwaysBuild, Command, Progress
Expand Down Expand Up @@ -920,7 +921,7 @@ def __init__(self, path=None, limit=1073741824, half_life=43200):
self.convert_size(limit), self.convert_size(self.get_size(path))
)
)
self.delete(self.file_list())
# self.delete(self.file_list())

def __call__(self, node, *args, **kw):
nonlocal node_count, node_count_max, node_count_interval, node_count_fname, show_progress
Expand Down Expand Up @@ -1018,6 +1019,15 @@ def progress_finish(target, source, env):
progress_finish_command = Command("progress_finish", [], progress_finish)
AlwaysBuild(progress_finish_command)

def progress_finally():
nonlocal node_count, progressor
try:
progressor.delete(progressor.file_list())
except Exception:
pass

atexit.register(progress_finally)


def dump(env):
# Dumps latest build information for debugging purposes and external tools.
Expand Down

0 comments on commit 7bfddee

Please sign in to comment.