some code cleanup

Jef Roosens 2022-05-03 17:18:12 +02:00
parent 5ab60c637b
commit e840d930e1
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
3 changed files with 7 additions and 10 deletions

View File

@ -10,11 +10,12 @@ import build
import docker
import db
// How many seconds to wait before retrying to update API if failed
const api_update_retry_timeout = 5
// How many seconds to wait before retrying to rebuild image if failed
const rebuild_base_image_retry_timout = 30
const (
// How many seconds to wait before retrying to update API if failed
api_update_retry_timeout = 5
// How many seconds to wait before retrying to rebuild image if failed
rebuild_base_image_retry_timout = 30
)
struct ScheduledBuild {
pub:

View File

@ -5,8 +5,6 @@ import net.http
import response { new_data_response, new_response }
import db
const repos_file = 'repos.json'
// get_repos returns the current list of repos.
['/api/repos'; get]
fn (mut app App) get_repos() web.Result {

View File

@ -20,9 +20,7 @@ pub:
conf Config [required; web_global]
pub mut:
repo repo.RepoGroupManager [required; web_global]
// This is used to claim the file lock on the repos file
git_mutex shared util.Dummy
db db.VieterDb
db db.VieterDb
}
// server starts the web server & starts listening for requests