@@ -29,7 +29,8 @@ impl RedisBroker {
29
29
impl Broker for RedisBroker {
30
30
fn push_message ( & self , message : & crate :: messages:: Message ) -> Result < ( ) > {
31
31
let mut con = self . redis_client . get_connection ( ) ?;
32
- con. lpush ( & self . queue , serde_json:: to_string ( & message) ?) ?;
32
+ let message_as_str = serde_json:: to_string ( & message) ?;
33
+ con. lpush :: < & str , String , ( ) > ( & self . queue , message_as_str) ?;
33
34
Ok ( ( ) )
34
35
}
35
36
@@ -44,7 +45,7 @@ impl Broker for RedisBroker {
44
45
45
46
fn store_result ( & self , result_message : crate :: messages:: ResultMessage ) -> Result < ( ) > {
46
47
let mut con = self . redis_client . get_connection ( ) ?;
47
- con. hset (
48
+ con. hset :: < & str , & str , String , ( ) > (
48
49
& self . result_hash_map ,
49
50
& result_message. signature_id ,
50
51
serde_json:: to_string ( & result_message) ?,
@@ -62,7 +63,7 @@ impl Broker for RedisBroker {
62
63
63
64
fn push_command ( & self , command : & crate :: messages:: Command , worker_id : & str ) -> Result < ( ) > {
64
65
let mut con = self . redis_client . get_connection ( ) ?;
65
- con. lpush (
66
+ con. lpush :: < & str , String , ( ) > (
66
67
& format ! ( "{}_{}" , self . command_queue_prefix, worker_id) ,
67
68
serde_json:: to_string ( & command) ?,
68
69
) ?;
@@ -83,7 +84,7 @@ impl Broker for RedisBroker {
83
84
84
85
fn update_worker_info ( & self , info : WorkerInfo ) -> Result < ( ) > {
85
86
let mut con = self . redis_client . get_connection ( ) ?;
86
- con. hset (
87
+ con. hset :: < & str , & str , String , ( ) > (
87
88
& self . worker_register ,
88
89
& info. id ,
89
90
serde_json:: to_string ( & info) ?,
0 commit comments