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:
2025-01-13 16:52:21 +02:00
parent da2881f973
commit 91f8520229
15 changed files with 478 additions and 244 deletions

View File

@@ -3,7 +3,7 @@ module gittools
import json
import freeflowuniverse.herolib.core.redisclient
fn redis_get() redisclient.Redis {
fn redis_get() &redisclient.Redis {
mut redis_client := redisclient.core_get() or { panic(err) }
return redis_client
}