wip [CI SKIP]
parent
af4c9e1d00
commit
e2331159d6
|
@ -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 {
|
||||
|
|
|
@ -57,7 +57,7 @@ fn (c &Client) send_request<T>(method Method, url string, params map[string]stri
|
|||
// output as a Response<T> object.
|
||||
fn (c &Client) send_request_with_body<T>(method Method, url string, params map[string]string, body string) !Response<T> {
|
||||
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 == '' {
|
||||
|
|
Loading…
Reference in New Issue