mirror of
https://github.com/nullishamy/ferri.git
synced 2025-06-29 01:24:17 +00:00
feat: queue infra
This commit is contained in:
parent
2270324711
commit
4b88100373
4 changed files with 77 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
use main::ap::http::HttpClient;
|
||||
use rocket::{State, get, response::status};
|
||||
use rocket_db_pools::Connection;
|
||||
use main::ap;
|
||||
use crate::OutboundQueue;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
|
@ -84,7 +86,9 @@ pub async fn resolve_user(acct: &str, host: &str) -> types::Person {
|
|||
}
|
||||
|
||||
#[get("/test")]
|
||||
pub async fn test(http: &State<HttpClient>) -> &'static str {
|
||||
pub async fn test(http: &State<HttpClient>, outbound: &State<OutboundQueue>) -> &'static str {
|
||||
outbound.0.send(ap::QueueMessage::Heartbeat);
|
||||
|
||||
let user = resolve_user("amy@fedi.amy.mov", "fedi.amy.mov").await;
|
||||
|
||||
let post = activity::CreateActivity {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue