Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Sep 20, 2024
1 parent 3b6264e commit b1622b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compose.router.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
comservices:
services:
scylla-server:
depends_on:
- siren
Expand Down
14 changes: 12 additions & 2 deletions scylla-server/src/processors/mqtt_processor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use std::{collections::HashMap, sync::Arc, time::Duration};
use std::{
collections::HashMap,
sync::Arc,
time::{Duration, SystemTime},
};

use prisma_client_rust::{bigdecimal::ToPrimitive, chrono, serde_json};
use protobuf::Message;
Expand Down Expand Up @@ -71,7 +75,13 @@ impl MqttProcessor {
) -> (MqttProcessor, MqttOptions) {
// create the mqtt client and configure it
let mut mqtt_opts = MqttOptions::new(
format!("ScyllaServer-{:?}", Instant::now()),
format!(
"ScyllaServer-{:?}",
SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.expect("Time went backwards")
.as_millis()
),
opts.mqtt_path.split_once(':').expect("Invalid Siren URL").0,
opts.mqtt_path
.split_once(':')
Expand Down

0 comments on commit b1622b9

Please sign in to comment.