forked from vieter-v/vieter
some code cleanup
parent
5ab60c637b
commit
e840d930e1
|
|
@ -10,11 +10,12 @@ import build
|
||||||
import docker
|
import docker
|
||||||
import db
|
import db
|
||||||
|
|
||||||
// How many seconds to wait before retrying to update API if failed
|
const (
|
||||||
const api_update_retry_timeout = 5
|
// 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
|
// How many seconds to wait before retrying to rebuild image if failed
|
||||||
const rebuild_base_image_retry_timout = 30
|
rebuild_base_image_retry_timout = 30
|
||||||
|
)
|
||||||
|
|
||||||
struct ScheduledBuild {
|
struct ScheduledBuild {
|
||||||
pub:
|
pub:
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import net.http
|
||||||
import response { new_data_response, new_response }
|
import response { new_data_response, new_response }
|
||||||
import db
|
import db
|
||||||
|
|
||||||
const repos_file = 'repos.json'
|
|
||||||
|
|
||||||
// get_repos returns the current list of repos.
|
// get_repos returns the current list of repos.
|
||||||
['/api/repos'; get]
|
['/api/repos'; get]
|
||||||
fn (mut app App) get_repos() web.Result {
|
fn (mut app App) get_repos() web.Result {
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,7 @@ pub:
|
||||||
conf Config [required; web_global]
|
conf Config [required; web_global]
|
||||||
pub mut:
|
pub mut:
|
||||||
repo repo.RepoGroupManager [required; web_global]
|
repo repo.RepoGroupManager [required; web_global]
|
||||||
// This is used to claim the file lock on the repos file
|
db db.VieterDb
|
||||||
git_mutex shared util.Dummy
|
|
||||||
db db.VieterDb
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// server starts the web server & starts listening for requests
|
// server starts the web server & starts listening for requests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue