Skip to content

Commit ff1a8d8

Browse files
committed
Auto merge of #615 - Mark-Simulacrum:opt, r=Mark-Simulacrum
Cache prepared SQL statements; delete outdated configuration endpoint See commits for details.
2 parents a14dda6 + 51d7e34 commit ff1a8d8

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/db/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub trait QueryUtils {
130130
fn execute(&self, sql: &str, params: &[&dyn ToSql]) -> Fallible<usize> {
131131
self.with_conn(|conn| {
132132
self.trace(sql, || {
133-
let mut prepared = conn.prepare(sql)?;
133+
let mut prepared = conn.prepare_cached(sql)?;
134134
let changes = prepared.execute(params)?;
135135
Ok(changes)
136136
})

src/server/routes/agent.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ pub fn routes(
3939
.and(auth_filter(data.clone(), TokenType::Agent))
4040
.map(endpoint_config);
4141

42-
// Assume agents that do not POST their capabilities to `/config` are Linux agents.
43-
let config_old = warp::get2()
44-
.and(warp::path("config"))
45-
.and(warp::path::end())
46-
.and(data_filter.clone())
47-
.and(auth_filter(data.clone(), TokenType::Agent))
48-
.map(|data, auth| endpoint_config(Capabilities::new(&["linux"]), data, auth));
49-
5042
let next_experiment = warp::get2()
5143
.and(warp::path("next-experiment"))
5244
.and(warp::path::end())
@@ -81,8 +73,6 @@ pub fn routes(
8173
warp::any()
8274
.and(
8375
config
84-
.or(config_old)
85-
.unify()
8676
.or(next_experiment)
8777
.unify()
8878
.or(record_progress)

0 commit comments

Comments
 (0)