chore: please the linter
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/man Pipeline was successful
ci/woodpecker/pr/docker Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
Jef Roosens 2022-12-13 17:51:42 +01:00
parent 5cbfc0ebcb
commit 03f2240ff6
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
6 changed files with 7 additions and 6 deletions

View file

@ -2,10 +2,8 @@ module server
import web
import web.response { new_data_response, new_response }
// import os
// import util
// import models { BuildLog, BuildLogFilter }
// v1_poll_job_queue allows agents to poll for new build jobs.
['/api/v1/jobs/poll'; auth; get]
fn (mut app App) v1_poll_job_queue() web.Result {
arch := app.query['arch'] or {

View file

@ -27,6 +27,8 @@ pub mut:
db db.VieterDb
}
// init_job_queue populates a fresh job queue with all the targets currently
// stored in the database.
fn (mut app App) init_job_queue() ! {
// Initialize build queues
mut targets := app.db.get_targets(limit: 25)