Merge pull request 'cron: filter out repos with wrong architecture' (#163) from Chewing_Bever/vieter:cron-check-arch into dev
ci/woodpecker/push/docs Pipeline was successful
Details
ci/woodpecker/push/lint Pipeline was successful
Details
ci/woodpecker/push/arch Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/docker Pipeline was successful
Details
ci/woodpecker/push/deploy Pipeline was successful
Details
ci/woodpecker/push/docs Pipeline was successful
Details
ci/woodpecker/push/lint Pipeline was successful
Details
ci/woodpecker/push/arch Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/docker Pipeline was successful
Details
ci/woodpecker/push/deploy Pipeline was successful
Details
Reviewed-on: vieter/vieter#163pull/164/head
commit
1156e896f7
|
@ -9,6 +9,7 @@ import math
|
|||
import build
|
||||
import docker
|
||||
import db
|
||||
import os
|
||||
|
||||
const (
|
||||
// How many seconds to wait before retrying to update API if failed
|
||||
|
@ -19,7 +20,6 @@ const (
|
|||
|
||||
struct ScheduledBuild {
|
||||
pub:
|
||||
repo_id string
|
||||
repo db.GitRepo
|
||||
timestamp time.Time
|
||||
}
|
||||
|
@ -187,6 +187,10 @@ fn (mut d Daemon) renew_repos() {
|
|||
return
|
||||
}
|
||||
|
||||
// Filter out any repos that shouldn't run on this architecture
|
||||
cur_arch := os.uname().machine
|
||||
new_repos = new_repos.filter(it.arch.any(it.value == cur_arch))
|
||||
|
||||
d.repos = new_repos
|
||||
|
||||
d.api_update_timestamp = time.now().add_seconds(60 * d.api_update_frequency)
|
||||
|
|
Loading…
Reference in New Issue