Skip to content

Commit

Permalink
Merge pull request #189 from stepchowfun/sleep-interval-while-docker-…
Browse files Browse the repository at this point in the history
…down

Increase the interval that Docuum sleeps between attempts to connect to the Docker event stream
  • Loading branch information
stepchowfun authored Aug 9, 2021
2 parents 5c51de5 + a7fb9fa commit 1a2d7b6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 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.20.3] - 2021-08-08

### Changed
- When Docker is not running, Docuum now restarts every 5 seconds instead of every second.

## [0.20.2] - 2021-08-02

### Fixed
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.20.2"
version = "0.20.3"
authors = ["Stephan Boyer <[email protected]>"]
edition = "2018"
description = "LRU eviction of Docker images."
Expand Down
2 changes: 1 addition & 1 deletion integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DOCUUM_PID="$!"
# several times at a 1 second interval.
wait_for_docuum() {
echo 'Waiting for Docuum to sleep…'
for _ in {0..4}; do
for _ in {0..7}; do
sleep 1
while [[ "$(awk '{ print $3 }' /proc/$DOCUUM_PID/stat)" != 'S' ]]; do
sleep 1
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ fn main() {
loop {
if let Err(e) = run(&settings, &mut state, &mut first_run) {
error!("{}", e);
info!("Restarting\u{2026}");
sleep(Duration::from_secs(1));
info!("Retrying in 5 seconds\u{2026}");
sleep(Duration::from_secs(5));
}
}
}

0 comments on commit 1a2d7b6

Please sign in to comment.