rename queue function

This commit is contained in:
Namekuji 2023-05-18 00:32:45 -04:00
parent e731ba1426
commit 68ce2192a1
No known key found for this signature in database
GPG key ID: B541BD6E646CABC7
3 changed files with 7 additions and 7 deletions

View file

@ -6,4 +6,4 @@ pub(crate) mod reqwest_shim;
pub(crate) mod traits;
/// Mime type for Activitypub data, used for `Accept` and `Content-Type` HTTP headers
pub static FEDERATION_CONTENT_TYPE: &str = "application/activity+json";
pub(crate) static FEDERATION_CONTENT_TYPE: &str = "application/activity+json";

View file

@ -1,3 +1,3 @@
mod error;
mod federation;
mod queue;
pub mod error;
pub(crate) mod federation;
pub mod queue;

View file

@ -1,4 +1,4 @@
//! Used to queue inbox and outbox tasks
//! Used to queue sending activity
use crate::{
error::Error,
@ -39,7 +39,7 @@ pub struct SendActivityTask {
pub trait QueueManager: DynClone + Send {
/// Called in [crate::queue::send_activity], and would call
/// [crate::queue::do_send] inside to send activity to remote servers.
async fn queue_send(&self, task: SendActivityTask) -> Result<(), Error>;
async fn queue_deliver(&self, task: SendActivityTask) -> Result<(), Error>;
}
clone_trait_object!(QueueManager);
@ -96,7 +96,7 @@ where
}
} else {
debug!(task = ?message, "Queue sending activity");
data.config.queue_manager.queue_send(message).await?;
data.config.queue_manager.queue_deliver(message).await?;
}
}