This commit is contained in:
@ -1,6 +1,4 @@
|
|||||||
use std::cell::RefCell;
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
|
|||||||
@ -1,14 +1,12 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use reqwest::{header::HeaderMap, Client, Request, RequestBuilder, Response, ResponseBuilderExt};
|
use reqwest::{header::HeaderMap, Client, Request, RequestBuilder, Response, ResponseBuilderExt};
|
||||||
use serde_json::{json, Value};
|
|
||||||
use std::collections::{HashMap, VecDeque};
|
use std::collections::{HashMap, VecDeque};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tokio::sync::RwLock;
|
use tokio::sync::RwLock;
|
||||||
use tokio::time;
|
use tokio::time;
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use crate::output_tracker::OutputTrackerAsync;
|
use crate::output_tracker::OutputTrackerAsync;
|
||||||
|
|
||||||
// Structure to store request information for verification
|
// Structure to store request information for verification
|
||||||
|
|||||||
@ -4,13 +4,13 @@ use std::time::Duration;
|
|||||||
use futures::{StreamExt, TryStreamExt};
|
use futures::{StreamExt, TryStreamExt};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tokio::io::AsyncBufReadExt;
|
use tokio::io::AsyncBufReadExt;
|
||||||
use tokio::task::{self, spawn_local, LocalSet};
|
use tokio::task::{spawn_local, LocalSet};
|
||||||
use tokio::{
|
use tokio::{
|
||||||
select,
|
select,
|
||||||
sync::{mpsc, oneshot},
|
sync::{mpsc, oneshot},
|
||||||
};
|
};
|
||||||
use tokio_stream::wrappers::LinesStream;
|
use tokio_stream::wrappers::LinesStream;
|
||||||
use tracing::{debug, error, info, warn, Instrument, Span};
|
use tracing::{debug, error, info, warn, Instrument};
|
||||||
|
|
||||||
use crate::credentials::Credentials;
|
use crate::credentials::Credentials;
|
||||||
use crate::http_client::HttpClient;
|
use crate::http_client::HttpClient;
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
use std::{cell::RefCell, rc::Rc};
|
|
||||||
|
|
||||||
use rusqlite::{params, Connection, Result};
|
use rusqlite::{params, Connection, Result};
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
|
|||||||
@ -388,7 +388,7 @@ impl NullNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl NotificationProxy for NullNotifier {
|
impl NotificationProxy for NullNotifier {
|
||||||
fn send(&self, n: Notification) -> anyhow::Result<()> {
|
fn send(&self, _n: Notification) -> anyhow::Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,12 @@
|
|||||||
use crate::actor_utils::send_command;
|
use crate::actor_utils::send_command;
|
||||||
use crate::models::NullNetworkMonitor;
|
|
||||||
use crate::models::NullNotifier;
|
|
||||||
use anyhow::{anyhow, Context};
|
use anyhow::{anyhow, Context};
|
||||||
use futures::future::join_all;
|
use futures::future::join_all;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use std::{collections::HashMap, future::Future, sync::Arc};
|
use std::{collections::HashMap, future::Future, sync::Arc};
|
||||||
use tokio::select;
|
use tokio::select;
|
||||||
use tokio::{
|
use tokio::{
|
||||||
sync::{broadcast, mpsc, oneshot, RwLock},
|
sync::{mpsc, oneshot, RwLock},
|
||||||
task::{spawn_local, LocalSet},
|
task::LocalSet,
|
||||||
};
|
};
|
||||||
use tracing::{error, info};
|
use tracing::{error, info};
|
||||||
|
|
||||||
@ -16,7 +14,7 @@ use crate::{
|
|||||||
http_client::HttpClient,
|
http_client::HttpClient,
|
||||||
message_repo::Db,
|
message_repo::Db,
|
||||||
models::{self, Account},
|
models::{self, Account},
|
||||||
ListenerActor, ListenerCommand, ListenerConfig, ListenerHandle, SharedEnv, SubscriptionHandle,
|
ListenerConfig, ListenerHandle, SharedEnv, SubscriptionHandle,
|
||||||
};
|
};
|
||||||
|
|
||||||
const CONNECT_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(15);
|
const CONNECT_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(15);
|
||||||
|
|||||||
Reference in New Issue
Block a user