feat(runner): implement cluster mode with Redis-based task dispatching and registry
Introduce a distributed task execution system for gRPC runners. This includes: - A `TaskBus` for cluster-mode task dispatching via Redis Pub/Sub. - A `RunnerRegistry` to track active runner instances in Redis. - Support for both standalone and cluster modes via configuration. - Refactored `RunnerHub` and `TaskManager` to use a `TaskDispatcher` interface, decoupling task submission from local execution. - Added distributed locking to `HotRankWorker` to ensure only one instance performs periodic hot rank recalculations in a multi-instance deployment. - Updated dependency injection (Wire) to support the new runner components and registry.
This commit is contained in:
@@ -518,6 +518,7 @@ func (r *Router) setupRoutes() {
|
||||
groups.PUT("/:id/join-type", r.groupHandler.HandleSetJoinType) // 加群方式
|
||||
groups.PUT("/:id/name", r.groupHandler.HandleSetGroupName) // 群名称
|
||||
groups.PUT("/:id/avatar", r.groupHandler.HandleSetGroupAvatar) // 群头像
|
||||
groups.PUT("/:id/description", r.groupHandler.HandleSetGroupDescription) // 群描述
|
||||
|
||||
// 群公告
|
||||
groups.POST("/:id/announcements", r.groupHandler.HandleCreateAnnouncement) // 创建公告
|
||||
|
||||
Reference in New Issue
Block a user