Truncate payload printed in the UI

Added a flag --max-payload-length to allow customizing the value
This commit is contained in:
Ken Hibino
2021-10-21 07:11:46 -07:00
parent 700a8a7ac6
commit b92ef4c369
3 changed files with 26 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ var staticContents embed.FS
func muxRouter(opts Options, rc redis.UniversalClient, inspector *asynq.Inspector) *mux.Router {
router := mux.NewRouter().PathPrefix(opts.RootPath).Subrouter()
var pf PayloadFormatter = defaultPayloadFormatter
var pf PayloadFormatter = DefaultPayloadFormatter
if opts.PayloadFormatter != nil {
pf = opts.PayloadFormatter
}