♻️ Refactored with new cache system

This commit is contained in:
2024-09-22 14:20:04 +08:00
parent 184fc3ecba
commit fb4e48551b
5 changed files with 93 additions and 24 deletions

View File

@@ -14,6 +14,7 @@ import (
"git.solsynth.dev/hydrogen/messaging/pkg/internal/server"
pkg "git.solsynth.dev/hydrogen/messaging/pkg/internal"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/cache"
"git.solsynth.dev/hydrogen/messaging/pkg/internal/database"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
@@ -44,6 +45,11 @@ func main() {
log.Fatal().Err(err).Msg("An error occurred when running database auto migration.")
}
// Initialize cache
if err := cache.NewCache(); err != nil {
log.Fatal().Err(err).Msg("An error occurred when initializing cache.")
}
// Connect other services
if err := gap.RegisterService(); err != nil {
log.Fatal().Err(err).Msg("An error occurred when connecting to consul...")