fix(cron): don't show error for empty cron schedule
ci/woodpecker/push/arch unknown status
Details
ci/woodpecker/push/docker unknown status
Details
ci/woodpecker/push/build_experimental Pipeline failed
Details
ci/woodpecker/push/lint Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/arch unknown status
Details
ci/woodpecker/push/docker unknown status
Details
ci/woodpecker/push/build_experimental Pipeline failed
Details
ci/woodpecker/push/lint Pipeline was successful
Details
ci/woodpecker/push/build Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
parent
f9f440500e
commit
cfacf9ed0f
4
Makefile
4
Makefile
|
@ -77,8 +77,8 @@ v/v:
|
||||||
clean:
|
clean:
|
||||||
rm -rf 'data' 'vieter' 'dvieter' 'pvieter' 'vieter.c' 'dvieterctl' 'vieterctl' 'pkg' 'src/vieter' *.pkg.tar.zst 'suvieter' 'afvieter' '$(SRC_DIR)/_docs'
|
rm -rf 'data' 'vieter' 'dvieter' 'pvieter' 'vieter.c' 'dvieterctl' 'vieterctl' 'pkg' 'src/vieter' *.pkg.tar.zst 'suvieter' 'afvieter' '$(SRC_DIR)/_docs'
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: api-docs
|
||||||
docs:
|
api-docs:
|
||||||
rm -rf '$(SRC_DIR)/_docs'
|
rm -rf '$(SRC_DIR)/_docs'
|
||||||
cd '$(SRC_DIR)' && v doc -all -f html -m -readme .
|
cd '$(SRC_DIR)' && v doc -all -f html -m -readme .
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,6 @@ pub fn build_repo(address string, api_key string, base_image_id string, repo &gi
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for 5 seconds
|
|
||||||
time.sleep(1 * time.second)
|
time.sleep(1 * time.second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,12 +132,17 @@ pub fn (mut d Daemon) run() ? {
|
||||||
|
|
||||||
// schedule_build adds the next occurence of the given repo build to the queue.
|
// schedule_build adds the next occurence of the given repo build to the queue.
|
||||||
fn (mut d Daemon) schedule_build(repo_id string, repo git.GitRepo) ? {
|
fn (mut d Daemon) schedule_build(repo_id string, repo git.GitRepo) ? {
|
||||||
ce := parse_expression(repo.schedule) or {
|
ce := if repo.schedule != '' {
|
||||||
|
parse_expression(repo.schedule) or {
|
||||||
// TODO This shouldn't return an error if the expression is empty.
|
// TODO This shouldn't return an error if the expression is empty.
|
||||||
d.lerror("Error while parsing cron expression '$repo.schedule' ($repo_id): $err.msg()")
|
d.lerror("Error while parsing cron expression '$repo.schedule' ($repo_id): $err.msg()")
|
||||||
|
|
||||||
d.global_schedule
|
d.global_schedule
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
d.global_schedule
|
||||||
|
}
|
||||||
|
|
||||||
// A repo that can't be scheduled will just be skipped for now
|
// A repo that can't be scheduled will just be skipped for now
|
||||||
timestamp := ce.next_from_now() ?
|
timestamp := ce.next_from_now() ?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue