refactor: renamed codebase to "targets"

This commit is contained in:
Jef Roosens 2022-06-14 22:25:40 +02:00 committed by Jef Roosens
parent faec08f846
commit 102a7f8899
Signed by untrusted user: Jef Roosens
GPG key ID: B580B976584B5F30
19 changed files with 205 additions and 191 deletions

View file

@ -9,7 +9,7 @@ import build
import docker
import os
import client
import models { GitRepo }
import models { Target }
const (
// How many seconds to wait before retrying to update API if failed
@ -20,7 +20,7 @@ const (
struct ScheduledBuild {
pub:
repo GitRepo
repo Target
timestamp time.Time
}
@ -38,7 +38,7 @@ mut:
api_update_frequency int
image_rebuild_frequency int
// Repos currently loaded from API.
repos []GitRepo
repos []Target
// At what point to update the list of repositories.
api_update_timestamp time.Time
image_build_timestamp time.Time
@ -149,7 +149,7 @@ pub fn (mut d Daemon) run() {
}
// schedule_build adds the next occurence of the given repo build to the queue.
fn (mut d Daemon) schedule_build(repo GitRepo) {
fn (mut d Daemon) schedule_build(repo Target) {
ce := if repo.schedule != '' {
parse_expression(repo.schedule) or {
// TODO This shouldn't return an error if the expression is empty.