mirror of
https://github.com/hibiken/asynq.git
synced 2025-09-20 05:37:17 +08:00
Add StateChanged(func(map[string]interface{}), more ...string) to client and server, to watch state updates with more customized detail, e.g. "completed:result" as default, e.g. pending:next\|task\|message\|result
This commit is contained in:
@@ -697,3 +697,8 @@ func (srv *Server) Stop() {
|
||||
srv.processor.stop()
|
||||
srv.logger.Info("Processor stopped")
|
||||
}
|
||||
|
||||
// StateChanged watch state updates, with more customized detail
|
||||
func (srv *Server) StateChanged(handler func(map[string]interface{}), more ...string) error {
|
||||
return srv.broker.StateChanged(handler, more...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user