Skip to content

Commit

Permalink
Merge pull request #98 from stepchowfun/save-initial-state
Browse files Browse the repository at this point in the history
Persist the state after the initial vacuum
  • Loading branch information
stepchowfun authored Oct 8, 2020
2 parents 0cc8c5c + 66cf987 commit aab3084
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.13.1] - 2020-10-08

### Fixed
- Docuum now persists its state after the initial run on startup, and not just on subsequent runs triggered by Docker events. The bug was introduced in the previous version, v0.13.0.

## [0.13.0] - 2020-10-08

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "docuum"
version = "0.13.0"
version = "0.13.1"
authors = ["Stephan Boyer <[email protected]>"]
edition = "2018"
description = "LRU eviction of Docker images"
Expand Down
4 changes: 2 additions & 2 deletions src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct ImageInfo {
created_since_epoch: Duration,
}

// This struct represents a node in the image tree.
// This struct represents a node in the image polyforest.
#[derive(Clone, Debug)]
struct ImageNode {
image_info: ImageInfo,
Expand Down Expand Up @@ -421,9 +421,9 @@ pub async fn run(settings: &Settings, state: &mut State) -> io::Result<()> {
)
})?;

// Run the main vacuum logic.
info!("Performing an initial vacuum on startup\u{2026}");
vacuum(&docker, state, &settings.threshold).await?;
state::save(&state)?;

info!("Listening for Docker events\u{2026}");
let mut events = docker.events(Option::<EventsOptions<String>>::None);
Expand Down

0 comments on commit aab3084

Please sign in to comment.