Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Commit 5a58084

Browse files
committed
Merge branch 'connection'
2 parents f469777 + ec906a5 commit 5a58084

6 files changed

Lines changed: 1691 additions & 15 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env_logger = "0.6"
1414
reqwest = "0.9"
1515

1616
redisql_lib = {path = "./redisql_lib"}
17+
telemetrics = {path = "./telemetrics"}
1718
# engine_pro = {path = "./engine_pro", optional = true}
1819

1920
[features]

redisql_lib/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
#[macro_use]
44
extern crate log;
5-
6-
#[macro_use]
75
extern crate serde;
86

97
pub mod community_statement;

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![warn(unused_extern_crates)]
22

33
mod commands;
4-
mod telemetrics;
54

65
extern crate env_logger;
76

@@ -39,6 +38,9 @@ use commands::{
3938
QueryStatementInto, UpdateStatement,
4039
};
4140

41+
#[cfg(not(feature = "pro"))]
42+
extern crate telemetrics;
43+
4244
unsafe extern "C" fn rdb_save(
4345
rdb: *mut r::rm::ffi::RedisModuleIO,
4446
value: *mut std::os::raw::c_void,
@@ -165,7 +167,8 @@ pub extern "C" fn RedisModule_OnLoad(
165167
.target(logTarget::Stdout)
166168
.init();
167169

168-
thread::spawn(|| telemetrics::start_telemetrics());
170+
#[cfg(not(feature = "pro"))]
171+
thread::spawn(telemetrics::start_telemetrics);
169172

170173
let c_data_type_name = CString::new("rediSQLDB").unwrap();
171174
let ptr_data_type_name = c_data_type_name.as_ptr();

0 commit comments

Comments
 (0)