From e2331159d6bfc47cfb63ac6fb5c3340eb1d72002 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Fri, 16 Dec 2022 18:18:25 +0100 Subject: [PATCH] wip [CI SKIP] --- src/agent/images.v | 8 ++++---- src/client/client.v | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/agent/images.v b/src/agent/images.v index 23b741d..c85844c 100644 --- a/src/agent/images.v +++ b/src/agent/images.v @@ -33,9 +33,9 @@ pub fn (m &ImageManager) get(base_image string) string { return m.images[base_image].last() } -// 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. +// up_to_date returns true if the last known builder image 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() { @@ -67,7 +67,7 @@ pub fn (mut m ImageManager) up_to_date(base_image string) bool { } // refresh_image builds a new builder image from the given base image. This -// function should only be called if `up_to_date` return false. +// function should only be called if `up_to_date` returned false. fn (mut m ImageManager) refresh_image(base_image string) ! { // TODO use better image tags for built images new_image := build.create_build_image(base_image) or { diff --git a/src/client/client.v b/src/client/client.v index 5f24197..e43f6f7 100644 --- a/src/client/client.v +++ b/src/client/client.v @@ -57,7 +57,7 @@ fn (c &Client) send_request(method Method, url string, params map[string]stri // output as a Response object. fn (c &Client) send_request_with_body(method Method, url string, params map[string]string, body string) !Response { res := c.send_request_raw(method, url, params, body)! - status := http.status_from_int(res.status_code) + status := res.status() // Just return an empty successful response if status.is_success() && res.body == '' {