drop status page argument to Broker::execute_ci

We'll insert them into the db soon enugh.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2024-07-03 17:25:23 +03:00
parent b3638a2342
commit b24692c6d1
3 changed files with 4 additions and 42 deletions
+1 -10
View File
@@ -16,7 +16,6 @@ use crate::{
error::BrokerError,
event::BrokerEvent,
msg::{MessageError, RequestBuilder},
pages::StatusPage,
};
const WAIT_FOR_EVENTS_DURATION: u64 = 10_000;
@@ -25,7 +24,6 @@ const WAIT_FOR_EVENTS_DURATION: u64 = 10_000;
pub struct QueueProcessorBuilder {
db: Option<Db>,
broker: Option<Broker>,
page: Option<StatusPage>,
}
impl QueueProcessorBuilder {
@@ -34,7 +32,6 @@ impl QueueProcessorBuilder {
db: self.db.ok_or(QueueError::Missing("db"))?,
profile: Profile::load().map_err(QueueError::Profile)?,
broker: self.broker.ok_or(QueueError::Missing("broker"))?,
page: self.page.ok_or(QueueError::Missing("page"))?,
})
}
@@ -47,18 +44,12 @@ impl QueueProcessorBuilder {
self.broker = Some(broker);
self
}
pub fn page(mut self, page: StatusPage) -> Self {
self.page = Some(page);
self
}
}
pub struct QueueProcessor {
db: Db,
profile: Profile,
broker: Broker,
page: StatusPage,
}
impl QueueProcessor {
@@ -116,7 +107,7 @@ impl QueueProcessor {
.build_trigger()
.map_err(|e| QueueError::build_trigger(event, e))?;
self.broker
.execute_ci(&trigger, &mut self.page)
.execute_ci(&trigger)
.map_err(QueueError::execute_ci)?;
Ok(false)
}