lib.rs: removed the need to define a consumer tag
This commit is contained in:
parent
e78d8d1d77
commit
b0fc4e69e2
|
@ -78,7 +78,6 @@ impl BunBunWorker {
|
|||
pub async fn add_non_rpc_consumer<J: NonRPCServerTask + 'static + Send>(
|
||||
&mut self,
|
||||
queue_name: &str,
|
||||
consumer_tag: &str,
|
||||
state: Arc<Mutex<J::State>>,
|
||||
) where
|
||||
<J as NonRPCServerTask>::State: std::marker::Send,
|
||||
|
@ -87,7 +86,7 @@ impl BunBunWorker {
|
|||
.channel
|
||||
.basic_consume(
|
||||
queue_name,
|
||||
consumer_tag,
|
||||
"",
|
||||
BasicConsumeOptions::default(),
|
||||
FieldTable::default(),
|
||||
)
|
||||
|
@ -125,7 +124,6 @@ impl BunBunWorker {
|
|||
pub async fn add_rpc_consumer<J: RPCServerTask + 'static + Send>(
|
||||
&mut self,
|
||||
queue_name: &str,
|
||||
consumer_tag: &str,
|
||||
state: Arc<Mutex<J::State>>,
|
||||
) where
|
||||
<J as RPCServerTask>::State: std::marker::Send,
|
||||
|
@ -136,7 +134,7 @@ impl BunBunWorker {
|
|||
.channel
|
||||
.basic_consume(
|
||||
queue_name,
|
||||
consumer_tag,
|
||||
"",
|
||||
BasicConsumeOptions::default(),
|
||||
FieldTable::default(),
|
||||
)
|
||||
|
|
|
@ -88,7 +88,6 @@ mod test {
|
|||
listener
|
||||
.add_rpc_consumer::<EmailJob>(
|
||||
"email-emailjob-v1.0.0",
|
||||
"emailjob",
|
||||
Arc::new(Mutex::new(State {
|
||||
something: "test".into(),
|
||||
})),
|
||||
|
@ -107,7 +106,6 @@ mod test {
|
|||
listener
|
||||
.add_rpc_consumer::<PanickingEmailJob>(
|
||||
"email-emailjob-v1.0.0",
|
||||
"emailjob",
|
||||
Arc::new(Mutex::new(State {
|
||||
something: "test".into(),
|
||||
})),
|
||||
|
|
Loading…
Reference in a new issue