Don't attempt to build a job with zero defined attrs
This commit is contained in:
parent
28d2d3c28d
commit
c1bfe1b01c
|
@ -105,6 +105,10 @@ impl<'a, 'b> JobActions<'a, 'b> {
|
||||||
self.tell(worker::Action::Ack);
|
self.tell(worker::Action::Ack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn nothing_to_do(&mut self) {
|
||||||
|
self.tell(worker::Action::Ack);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn merge_failed(&mut self) {
|
pub fn merge_failed(&mut self) {
|
||||||
let msg = buildresult::BuildResult {
|
let msg = buildresult::BuildResult {
|
||||||
repo: self.job.repo.clone(),
|
repo: self.job.repo.clone(),
|
||||||
|
@ -232,6 +236,11 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
|
||||||
) {
|
) {
|
||||||
let mut actions = self.actions(&job, notifier);
|
let mut actions = self.actions(&job, notifier);
|
||||||
|
|
||||||
|
if job.attrs.len() == 0 {
|
||||||
|
actions.nothing_to_do();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
info!("Working on {}", job.pr.number);
|
info!("Working on {}", job.pr.number);
|
||||||
let project = self.cloner.project(
|
let project = self.cloner.project(
|
||||||
job.repo.full_name.clone(),
|
job.repo.full_name.clone(),
|
||||||
|
|
Loading…
Reference in a new issue