refactor: improve redis client and publisher
- Refactor the redis client to use a mutex for thread safety. - Improve error handling in context and playbook factory. - Remove the play_mdbook command and associated tests. - Add play_publisher command and tests for publishing books. - Update the repository cache to use a reference to the redis client. Co-authored-by: mahmmoud.hassanein <mahmmoud.hassanein@gmail.com>
This commit is contained in:
@@ -70,8 +70,8 @@ pub fn (mut self Context) redis() !&redisclient.Redis {
|
||||
// make sure we are on the right db
|
||||
r.selectdb(int(self.config.id))!
|
||||
}
|
||||
self.redis_ = &r
|
||||
&r
|
||||
self.redis_ = r
|
||||
r
|
||||
}
|
||||
|
||||
return r2
|
||||
|
||||
Reference in New Issue
Block a user