This commit is contained in:
41666 2022-12-09 11:16:53 -05:00
parent 93bccd3b19
commit 05e30e4420
4 changed files with 1 additions and 10 deletions

1
Cargo.lock generated
View file

@ -2510,7 +2510,6 @@ dependencies = [
"futures",
"futures-util",
"lazy_static",
"redis",
"serde",
"serde-aux",
"serde_json",

View file

@ -16,7 +16,7 @@ services:
image: ghcr.io/genudine/saerro/api:latest
pull_policy: always
ports:
- 8000:80
- 80:8000
links:
- tsdb
restart: always

View file

@ -6,7 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
redis = { version = "0.22.1", default_features = false, features = ["r2d2"] }
lazy_static = "1.4.0"
tokio-tungstenite = { version = "0.18.0", features=["native-tls"] }
serde = { version = "1.0.149", features = ["derive"] }

View file

@ -14,8 +14,6 @@ use tokio_tungstenite::{connect_async, tungstenite::Message};
mod translators;
lazy_static! {
// static ref PAIR: String = env::var("PAIR").unwrap_or_default();
// static ref ROLE: String = env::var("ROLE").unwrap_or("primary".to_string());
static ref WS_ADDR: String = env::var("WS_ADDR").unwrap_or_default();
static ref PG: AsyncOnce<sqlx::PgPool> = AsyncOnce::new(async {
let db_url = std::env::var("DATABASE_URL")
@ -77,11 +75,6 @@ struct AnalyticsEvent {
event_name: String,
}
// async fn track_pop(pop_event: PopEvent) {
// track_pop_db(pop_event.clone()).await;
// track_pop_redis(pop_event).await;
// }
async fn track_pop(pop_event: PopEvent) {
// println!("[ws/track_pop]");
let pool = PG.get().await;