Skip to content

Commit

Permalink
build: remove unsed ImageBuilder after 24h
Browse files Browse the repository at this point in the history
The server still requires more storage than needed, automatically remove
ImageBuilder that haven't been used within the last 24 hours.

Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Jul 29, 2022
1 parent 6f96889 commit c7c6103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asu/build.py
Expand Up @@ -391,7 +391,7 @@ def download_file(filename: str, dest: str = None):
last_build_timestamp.decode(),
)

if now_timestamp - int(last_build_timestamp.decode()) > 60 * 60 * 24 * 7:
if now_timestamp - int(last_build_timestamp.decode()) > 60 * 60 * 24:
log.info("Removing unused ImageBuilder for %s", target_subtarget)
job.connection.hdel(
f"worker:{job.worker_name}:last_build", target_subtarget
Expand Down

0 comments on commit c7c6103

Please sign in to comment.