Ver Fonte

取消限频打印

JiahengHe há 1 ano atrás
pai
commit
25770cfd00
1 ficheiros alterados com 3 adições e 6 exclusões
  1. 3 6
      standard/src/coinex_swap.rs

+ 3 - 6
standard/src/coinex_swap.rs

@@ -1,7 +1,6 @@
 use std::collections::{BTreeMap};
 use std::io::{Error, ErrorKind};
 use std::str::FromStr;
-use std::time::Duration;
 use tokio::sync::mpsc::Sender;
 use async_trait::async_trait;
 use futures::stream::FuturesUnordered;
@@ -625,7 +624,6 @@ impl Platform for CoinexSwap {
                         self_clone.order_sender.send(result).await.unwrap();
                     }
                     Err(error) => {
-                        let error_info = error.to_string();
                         let mut err_order = Order::new();
                         err_order.custom_id = cid.clone();
                         err_order.status = "REMOVE".to_string();
@@ -633,10 +631,9 @@ impl Platform for CoinexSwap {
                         self_clone.order_sender.send(err_order).await.unwrap();
                         self_clone.error_sender.send(error).await.unwrap();
                         // 触发限频
-                        if error_info.to_string().contains("213:Please don't try too frequently") {
-                            error!("触发限频, 1s后再下单");
-                            tokio::time::sleep(Duration::from_secs(1)).await;
-                        }
+                        // if error_info.to_string().contains("213:Please don't try too frequently") {
+                        //     Err(Error::new(ErrorKind::Other, "触发限频, 请调整下单频率"))
+                        // }
                     }
                 }
             });