Skip to content

Commit f26ce00

Browse files
committed
chore: cleanup
1 parent f5aa48f commit f26ce00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/dispatch_consumer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ pub async fn consume(channel: Channel, consumer_tag: &str, storage: Data<Storage
4646
info!("message consumed: {:?}", cmd);
4747

4848
// todo allow to revive endpoint, check endpoint status and reset circuit breaker
49-
let endpoint_id = cmd.endpoint_id();
50-
let msg = storage.messages.get(cmd.msg_id());
5149

50+
let msg = storage.messages.get(cmd.msg_id());
5251
if msg.is_err() {
5352
error!(
5453
"Message {} doesn't not exists and cannot be dispatched",
@@ -60,6 +59,7 @@ pub async fn consume(channel: Channel, consumer_tag: &str, storage: Data<Storage
6059
continue;
6160
}
6261

62+
let endpoint_id = cmd.endpoint_id();
6363
let endpoint = storage.endpoints.get(&endpoint_id);
6464
if endpoint.is_err() {
6565
error!(

0 commit comments

Comments
 (0)