Compare commits

..

5 commits

Author SHA1 Message Date
asonix 39da69b1aa Use tokio-postgres-generic-rustls
All checks were successful
/ clippy (pull_request) Successful in 2m18s
/ tests (pull_request) Successful in 2m28s
/ check (aarch64-unknown-linux-musl) (pull_request) Successful in 3m28s
/ check (armv7-unknown-linux-musleabihf) (pull_request) Successful in 3m9s
/ check (x86_64-unknown-linux-musl) (pull_request) Successful in 2m8s
2024-05-03 22:39:30 -05:00
asonix 64b8635059 Update rustls for tokio-postgres
This doesn't update rustls for actix-web (0.22), or rustls for reqwest (0.21)
2024-05-03 22:39:30 -05:00
asonix d45e3fa386 Remove unused 'remove' repo method
All checks were successful
/ clippy (push) Successful in 2m4s
/ tests (push) Successful in 2m43s
/ check (aarch64-unknown-linux-musl) (push) Successful in 2m35s
/ check (armv7-unknown-linux-musleabihf) (push) Successful in 2m53s
/ check (x86_64-unknown-linux-musl) (push) Successful in 2m43s
2024-05-03 22:35:20 -05:00
asonix bfd4fd4689 Remove unused StatusError type 2024-05-03 22:34:18 -05:00
asonix 89f3c447a8 clippy
All checks were successful
/ clippy (push) Successful in 2m9s
/ tests (push) Successful in 3m12s
/ check (armv7-unknown-linux-musleabihf) (push) Successful in 3m1s
/ check (aarch64-unknown-linux-musl) (push) Successful in 2m58s
/ check (x86_64-unknown-linux-musl) (push) Successful in 2m58s
2024-05-01 14:57:03 -05:00
4 changed files with 1 additions and 42 deletions

View file

@ -59,9 +59,6 @@ impl Drop for MetricsGuard {
}
}
#[derive(Debug)]
struct StatusError(ExitStatus);
pub(crate) struct Process {
command: Arc<str>,
child: Child,
@ -487,11 +484,3 @@ impl ProcessRead {
}
}
}
impl std::fmt::Display for StatusError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "Command failed with bad status: {}", self.0)
}
}
impl std::error::Error for StatusError {}

View file

@ -444,7 +444,6 @@ where
pub(crate) trait SettingsRepo: BaseRepo {
async fn set(&self, key: &'static str, value: Arc<[u8]>) -> Result<(), RepoError>;
async fn get(&self, key: &'static str) -> Result<Option<Arc<[u8]>>, RepoError>;
async fn remove(&self, key: &'static str) -> Result<(), RepoError>;
}
#[async_trait::async_trait(?Send)]
@ -459,10 +458,6 @@ where
async fn get(&self, key: &'static str) -> Result<Option<Arc<[u8]>>, RepoError> {
T::get(self, key).await
}
async fn remove(&self, key: &'static str) -> Result<(), RepoError> {
T::remove(self, key).await
}
}
#[async_trait::async_trait(?Send)]

View file

@ -1412,24 +1412,6 @@ impl SettingsRepo for PostgresRepo {
Ok(opt)
}
#[tracing::instrument(level = "debug", skip(self))]
async fn remove(&self, input_key: &'static str) -> Result<(), RepoError> {
use schema::settings::dsl::*;
let mut conn = self.get_connection().await?;
diesel::delete(settings)
.filter(key.eq(input_key))
.execute(&mut conn)
.with_metrics(crate::init_metrics::POSTGRES_SETTINGS_REMOVE)
.with_timeout(Duration::from_secs(5))
.await
.map_err(|_| PostgresError::DbTimeout)?
.map_err(PostgresError::Diesel)?;
Ok(())
}
}
#[async_trait::async_trait(?Send)]

View file

@ -807,7 +807,7 @@ impl QueueRepo for SledRepo {
.read()
.unwrap()
.get(&queue_name)
.map(Arc::clone);
.cloned();
let notify = if let Some(notify) = opt {
notify
@ -945,13 +945,6 @@ impl SettingsRepo for SledRepo {
Ok(opt.map(|ivec| Arc::from(ivec.to_vec())))
}
#[tracing::instrument(level = "trace", skip(self))]
async fn remove(&self, key: &'static str) -> Result<(), RepoError> {
b!(self.settings, settings.remove(key));
Ok(())
}
}
fn variant_access_key(hash: &[u8], variant: &str) -> Vec<u8> {