forked from jmug/stoatchat
chore: update es code to lapin
Signed-off-by: Zomatree <me@zomatree.live>
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use crate::utils::Consumer;
|
||||
use anyhow::Result;
|
||||
use async_trait::async_trait;
|
||||
use lapin::{message::Delivery, Channel, Connection};
|
||||
use log::debug;
|
||||
use revolt_database::{events::rabbit::*, Database};
|
||||
use revolt_database::{amqp::consumer::Consumer, events::rabbit::*, Database};
|
||||
|
||||
#[derive(Clone)]
|
||||
#[allow(unused)]
|
||||
@@ -17,11 +16,7 @@ pub struct GenericConsumer {
|
||||
|
||||
#[async_trait]
|
||||
impl Consumer for GenericConsumer {
|
||||
async fn create(
|
||||
db: Database,
|
||||
connection: Arc<Connection>,
|
||||
channel: Arc<Channel>,
|
||||
) -> Self {
|
||||
async fn create(db: Database, connection: Arc<Connection>, channel: Arc<Channel>, _: ()) -> Self {
|
||||
Self {
|
||||
db,
|
||||
connection,
|
||||
|
||||
Reference in New Issue
Block a user