Compare commits
	
		
			1 Commits 
		
	
	
		
			0604de26c4
			...
			aaef057347
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | aaef057347 | 
|  | @ -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 { | ||||
|  |  | |||
|  | @ -33,12 +33,11 @@ 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. | ||||
| // 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. | ||||
| 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 | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue