mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
More useful tracing spans
This commit is contained in:
parent
c0ce2ebbf8
commit
5172f66c1a
14 changed files with 121 additions and 27 deletions
|
|
@ -30,6 +30,7 @@ pub(crate) struct Service {
|
|||
|
||||
impl Service {
|
||||
/// Uploads a file.
|
||||
#[tracing::instrument(skip(self, file))]
|
||||
pub(crate) async fn create(
|
||||
&self,
|
||||
mxc: String,
|
||||
|
|
@ -54,6 +55,7 @@ impl Service {
|
|||
|
||||
/// Uploads or replaces a file thumbnail.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[tracing::instrument(skip(self, file))]
|
||||
pub(crate) async fn upload_thumbnail(
|
||||
&self,
|
||||
mxc: String,
|
||||
|
|
@ -79,6 +81,7 @@ impl Service {
|
|||
}
|
||||
|
||||
/// Downloads a file.
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub(crate) async fn get(&self, mxc: String) -> Result<Option<FileMeta>> {
|
||||
if let Ok((content_disposition, content_type, key)) =
|
||||
self.db.search_file_metadata(mxc, 0, 0)
|
||||
|
|
@ -129,6 +132,7 @@ impl Service {
|
|||
/// For width,height <= 96 the server uses another thumbnailing algorithm
|
||||
/// which crops the image afterwards.
|
||||
#[allow(clippy::too_many_lines)]
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub(crate) async fn get_thumbnail(
|
||||
&self,
|
||||
mxc: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue