diff --git a/src/agent/daemon.v b/src/agent/daemon.v index efffae8..8fa3816 100644 --- a/src/agent/daemon.v +++ b/src/agent/daemon.v @@ -83,7 +83,7 @@ pub fn (mut d AgentDaemon) run() { // Make sure a recent build base image is available for // building the config if !d.images.up_to_date(config.base_image) { - d.linfo("Building builder image from base image $config.base_image") + d.linfo('Building builder image from base image $config.base_image') // TODO handle this better than to just skip the config d.images.refresh_image(config.base_image) or { diff --git a/src/agent/images.v b/src/agent/images.v index 76e2189..23b741d 100644 --- a/src/agent/images.v +++ b/src/agent/images.v @@ -33,11 +33,12 @@ pub fn (m &ImageManager) get(base_image string) string { return m.images[base_image].last() } -// outdated returns whether the last known builder image is exists and is up to -// date. If this function returns true, the last builder image may be used to -// perform a build. +// up_to_date returns whether the last known builder image is exists and is up +// to date. If this function returns true, the last builder image may be used +// to perform a build. pub fn (mut m ImageManager) up_to_date(base_image string) bool { - if base_image !in m.timestamps || m.timestamps[base_image].add_seconds(m.max_image_age) <= time.now() { + if base_image !in m.timestamps + || m.timestamps[base_image].add_seconds(m.max_image_age) <= time.now() { return false }