Skip to content

Commit

Permalink
Don't full prune prematurely
Browse files Browse the repository at this point in the history
  • Loading branch information
phelpsdb committed Jan 4, 2024
1 parent 0674bda commit ad2ea6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/scripts/periodic-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function disk_usage_above_threshold() {
if disk_usage_above_threshold $PRUNE_THRESHOLD; then
echo "Cleaning up docker..."
docker system prune -f
if disk_usage_above_threshold $FULL_PRUNE_THRESHOLD; then
echo "Disk usage exceeds full prune threshold, perfoming full cleanup..."
docker system prune -af
fi
fi

if disk_usage_above_threshold $FULL_PRUNE_THRESHOLD && [[ $1 = "--full" ]]; then
echo "Disk usage exceeds full prune threshold, perfoming full cleanup..."
docker system prune -af
fi

0 comments on commit ad2ea6e

Please sign in to comment.